Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:38071 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 58429 invoked from network); 2 Jun 2008 08:23:08 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 2 Jun 2008 08:23:08 -0000 Authentication-Results: pb1.pair.com smtp.mail=derick@php.net; spf=unknown; sender-id=unknown Authentication-Results: pb1.pair.com header.from=derick@php.net; sender-id=unknown Received-SPF: unknown (pb1.pair.com: domain php.net does not designate 82.94.239.7 as permitted sender) X-PHP-List-Original-Sender: derick@php.net X-Host-Fingerprint: 82.94.239.7 mail.jdi-ict.nl Linux 2.6 Received: from [82.94.239.7] ([82.94.239.7:57024] helo=mail.jdi-ict.nl) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 32/F4-25418-CEDA3484 for ; Mon, 02 Jun 2008 04:23:08 -0400 Received: from localhost (localhost [127.0.0.1]) by mail.jdi-ict.nl (8.13.7/8.12.11) with ESMTP id m528N3RD015664; Mon, 2 Jun 2008 10:23:04 +0200 Date: Mon, 2 Jun 2008 10:23:03 +0200 (CEST) X-X-Sender: derick@kossu.ez.no To: Hannes Magnusson cc: Stanislav Malyshev , PHP Internals In-Reply-To: <7f3ed2c30806011432l51044d1dx68abfa28e22ad671@mail.gmail.com> Message-ID: 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> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=UTF-8 Subject: Re: [PHP-DEV] multiple use From: derick@php.net (Derick Rethans) On Sun, 1 Jun 2008, 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. > 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've to agree with this. Derick -- Derick Rethans http://derickrethans.nl | http://ezcomponents.org | http://xdebug.org