Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:38068 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 43409 invoked from network); 2 Jun 2008 06:42:56 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 2 Jun 2008 06:42:56 -0000 Authentication-Results: pb1.pair.com smtp.mail=mark@dynom.nl; spf=unknown; sender-id=unknown Authentication-Results: pb1.pair.com header.from=mark@dynom.nl; sender-id=unknown Received-SPF: unknown (pb1.pair.com: domain dynom.nl does not designate 85.92.132.6 as permitted sender) X-PHP-List-Original-Sender: mark@dynom.nl X-Host-Fingerprint: 85.92.132.6 smtp1.duximus.nl Linux 2.5 (sometimes 2.4) (4) Received: from [85.92.132.6] ([85.92.132.6:34931] helo=smtp1.duximus.nl) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 81/32-25418-E6693484 for ; Mon, 02 Jun 2008 02:42:56 -0400 Received: by smtp1.duximus.nl (Postfix, from userid 501) id F10F4B003E5; Mon, 2 Jun 2008 08:42:41 +0200 (CEST) X-Spam-Checker-Version: SpamAssassin 3.1.9 (2007-02-13) on dux03.duximus.nl X-Spam-Level: X-Spam-Status: No, score=-2.5 required=1.8 tests=AWL,BAYES_00 autolearn=ham version=3.1.9 Received: from localhost (dux03.duximus.nl [127.0.0.1]) by smtp1.duximus.nl (Postfix) with ESMTP id 284A6B003F4; Mon, 2 Jun 2008 08:42:38 +0200 (CEST) X-Virus-Scanned: amavisd-new at duximus.nl Received: from smtp1.duximus.nl ([127.0.0.1]) by localhost (dux03.duximus.nl [127.0.0.1]) (amavisd-new, port 10024) with LMTP id dECKvZ4EXGIN; Mon, 2 Jun 2008 08:42:36 +0200 (CEST) Received: from dux05.duximus.nl (unknown [85.92.132.30]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by smtp1.duximus.nl (Postfix) with ESMTP id 416D4B003DC; Mon, 2 Jun 2008 08:42:36 +0200 (CEST) Received: from localhost ([127.0.0.1] helo=[192.168.0.52]) by dux05.duximus.nl with esmtpa (Exim 4.60) (envelope-from ) id 1K33kj-0007n0-W3; Mon, 02 Jun 2008 08:42:46 +0200 Message-ID: <48439667.2040706@dynom.nl> Date: Mon, 02 Jun 2008 08:42:47 +0200 User-Agent: Thunderbird 2.0.0.14 (Windows/20080421) MIME-Version: 1.0 To: Hannes Magnusson CC: Stanislav Malyshev , PHP Internals References: <4842C9AF.6040803@zend.com> <7f3ed2c30806010943k79790024hf0e83bf5ea5a5340@mail.gmail.com> <4842D84D.50509@zend.com> <7f3ed2c30806011030q73608bfo40ce3bddbb80f56d@mail.gmail.com> <4842DFB2.8050002@zend.com> <7f3ed2c30806011432l51044d1dx68abfa28e22ad671@mail.gmail.com> In-Reply-To: <7f3ed2c30806011432l51044d1dx68abfa28e22ad671@mail.gmail.com> X-Enigmail-Version: 0.95.6 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Subject: Re: [PHP-DEV] multiple use From: mark@dynom.nl (Mark van der Velden) Hannes Magnusson wrote: > On Sun, Jun 1, 2008 at 7:43 PM, Stanislav Malyshev wrote: >> Hi! >> >>> use FooBar::In::Some::NameSpace as foo, >>> SomeOther::Cool:Massive::awesome::space as bar, And::other:namespace >>> as foobar; >>> vs >>> use FooBar::In::Some::NameSpace as foo; >>> use SomeOther::Cool:Massive::awesome::space as bar; >>> use And::other:namespace as foobar; >> Well, with (im)proper formatting many things can be unreadable, but >> use FooBar::In::Some::NameSpace as foo, >> SomeOther::Cool:Massive::awesome::space as bar, >> And::other:namespace as foobar; >> >> doesn't seem unreadable at all to me. Repeating "use" is just clutter which >> doesn't add anything. And btw not all names are that long - when I actually >> used namespaces in the code, I found that it'd be much easier if I could >> chain declarations. Just as it is easier to do $a = array(1,2,3) and not $a >> = array(); $a[0] = 1; $a[1] = 2; $a[2] = 3; > > I don't know what else I can say. You asked if someone had objections > and I replied stating my personal opinion that I find explicit use > statements in multiple lines more readable. Perhaps it is. But like mentioned earlier, you can do it with multiple things already, it only makes sense adding that support to the use feature also. > I don't really see the point in dropping three characters if you are > going to indent it just the same anyway, doesn't even safe you a > single keystroke.. I'd say use more often :-> You don't have to use it, it doesn't exclude the other. > > -Hannes > If it's not too much work, and if it doesn't break anything. I'd say just add it, let's not counter every patch that makes it to the list. - Mark