Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:81521 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 43620 invoked from network); 1 Feb 2015 05:41:12 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 1 Feb 2015 05:41:12 -0000 Authentication-Results: pb1.pair.com smtp.mail=marcio.web2@gmail.com; spf=pass; sender-id=pass Authentication-Results: pb1.pair.com header.from=marcio.web2@gmail.com; sender-id=pass Received-SPF: pass (pb1.pair.com: domain gmail.com designates 209.85.215.49 as permitted sender) X-PHP-List-Original-Sender: marcio.web2@gmail.com X-Host-Fingerprint: 209.85.215.49 mail-la0-f49.google.com Received: from [209.85.215.49] ([209.85.215.49:35301] helo=mail-la0-f49.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id D8/2F-01632-77CBDC45 for ; Sun, 01 Feb 2015 00:41:12 -0500 Received: by mail-la0-f49.google.com with SMTP id gf13so31918206lab.8 for ; Sat, 31 Jan 2015 21:41:09 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:reply-to:in-reply-to:references:from:date:message-id :subject:to:cc:content-type; bh=tw3v5OndeK9cLsF+ejD4x8Iz3GDtZGWAFsQI13ciVvs=; b=ozftFPAXXSNAN21Sr982XRocoxywDvdZmo7xLuBUWsS5yzLkdgFZ2u/FtB0r4AI6f5 8TPbpAp9LpAJgeNCvZWx5DNu7psdWp8EaQpVBe8h6WRt3t70k2PQblWqIIwAV2k6l1iq aEk+b6QoIcpAuI0V6d859l2P4nU9XBPCGY4Uk2F1NQOurKqfaMgY7lmIe/BrKzUhFcXy vE4+KLsIIK/8zluYA8bNNo2o+meEO0c7qIT5gG0AQmUFi+IpiL4fHb8iSmkkTl7Pe9hd U4KemMpUGZyMZrEUp4axzbQyria6KqB7SIAgGpAcuewa0Q0EpT4WpSa4R6aoHiUo1iYy ulQQ== X-Received: by 10.152.5.2 with SMTP id o2mr13757043lao.5.1422769269403; Sat, 31 Jan 2015 21:41:09 -0800 (PST) MIME-Version: 1.0 Received: by 10.152.21.101 with HTTP; Sat, 31 Jan 2015 21:40:49 -0800 (PST) Reply-To: marcio3w@gmail.com In-Reply-To: <54CCF086.9090904@fischer.name> References: <54CCF086.9090904@fischer.name> Date: Sun, 1 Feb 2015 02:40:49 -0300 Message-ID: To: Markus Fischer Cc: PHP internals Content-Type: multipart/alternative; boundary=089e013d1006e6751b050e00483e Subject: Re: [PHP-DEV][RFC][DISCUSSION] Group Use Declarations From: marcio.web2@gmail.com (Marcio Almada) --089e013d1006e6751b050e00483e Content-Type: text/plain; charset=UTF-8 Hi, Markus > [...] with proper tooling I almost > can't remember when I wrote the statements by hand; they usually a) get > automatically managed b) thus alphabetically sorted and c) folded away > in general. You're basically stating we don't need to improve language syntax because your IDE already handle the laborious parts for you. I invite you to think about a big part of the user base that would like to have a shorthand syntax and don't like to have namespaces "folded away" (hidden) by an IDE. Anyway, the "proper tooling" you reffered would quickly be updated to handle syntax additions and you won't loose anything with that. The point is that not all PHP user base should be obligated to use whatever ones define as "proper tooling" to have a pleasant experience with the language, this should come by design :) Other languages like Rust, Python, Scala, etc, have analogous features and I'm sure IDEs have good support for it. Same will/would happen to PHP. > The RFC says: > "Group use statements makes it easier to identify that multiple imported: entities are from the same module." > > IMHO that's too subjective. What "is hard" with the current state of affairs? Readability is not that subject. Current syntax is obviously harder to read: `use function foo\math\sin, foo\math\cos, foo\math\cosh, foo\math\tan, foo\math\atan;` When compared to the proposed: `use function foo\math\{ sin, cos, cosh, tan, atan };` > Btw, here's a CON you can add to the RFC (and, btw., it doesn't contain any): > - Prevents searching sources literally for used namespaces > What is the real benefit of using groups it and who's the group > benefiting from that change? Maybe you can expand on that in the RFC. That's sounds reasonable to me, I'll soon update the RFC with your point and expand the benefits part. Thank you! --089e013d1006e6751b050e00483e--