Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:38064 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 84882 invoked from network); 1 Jun 2008 21:33:03 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 1 Jun 2008 21:33:03 -0000 Authentication-Results: pb1.pair.com header.from=hannes.magnusson@gmail.com; sender-id=pass; domainkeys=bad Authentication-Results: pb1.pair.com smtp.mail=hannes.magnusson@gmail.com; spf=pass; sender-id=pass Received-SPF: pass (pb1.pair.com: domain gmail.com designates 66.249.92.175 as permitted sender) DomainKey-Status: bad X-DomainKeys: Ecelerity dk_validate implementing draft-delany-domainkeys-base-01 X-PHP-List-Original-Sender: hannes.magnusson@gmail.com X-Host-Fingerprint: 66.249.92.175 ug-out-1314.google.com Received: from [66.249.92.175] ([66.249.92.175:28319] helo=ug-out-1314.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 8B/78-35077-E8513484 for ; Sun, 01 Jun 2008 17:33:02 -0400 Received: by ug-out-1314.google.com with SMTP id h3so199132ugf.29 for ; Sun, 01 Jun 2008 14:32:59 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:date:from:to :subject:cc:in-reply-to:mime-version:content-type :content-transfer-encoding:content-disposition:references; bh=N+Q4CtfJS/+W8rH0tArOGZys2XNMpRtwaOUgb0rxWFA=; b=e6wbjX8nkswqXyQ4yiaCLlVlUdCXNnRtT2ZksmHrWN1HgKmqFilRqB7V0MFaBcMUP5 RbKMX0W0e3xC4He2H8mjKcJnrN3ssvH4a5BzJ4wGNk5JaXkSQX8PJYez4GdxktN10OzI 622M5uLRo3IBfIRlvbUpu3kCBCT4EtaR/fbDI= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:to:subject:cc:in-reply-to:mime-version :content-type:content-transfer-encoding:content-disposition :references; b=CSkKYXfKBC1aDqckrfGGLqtNlzATU+RKs6RQpRT8Mbh94iQXWA0J5ZK15br3lZgg9X z3FgTwGOvqjQ/tR4P5+1fGpAZD9ryqrJxF4RrJ6fGBj9X9StQFJsdiXLC0Ow4jwlXAWg lACli1PTi8VfkGfVVhvc0CTgiPB8DClRlvJwA= Received: by 10.66.239.16 with SMTP id m16mr805299ugh.28.1212355978818; Sun, 01 Jun 2008 14:32:58 -0700 (PDT) Received: by 10.67.25.8 with HTTP; Sun, 1 Jun 2008 14:32:58 -0700 (PDT) Message-ID: <7f3ed2c30806011432l51044d1dx68abfa28e22ad671@mail.gmail.com> Date: Sun, 1 Jun 2008 23:32:58 +0200 To: "Stanislav Malyshev" Cc: "PHP Internals" In-Reply-To: <4842DFB2.8050002@zend.com> MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline References: <4842C9AF.6040803@zend.com> <7f3ed2c30806010943k79790024hf0e83bf5ea5a5340@mail.gmail.com> <4842D84D.50509@zend.com> <7f3ed2c30806011030q73608bfo40ce3bddbb80f56d@mail.gmail.com> <4842DFB2.8050002@zend.com> Subject: Re: [PHP-DEV] multiple use From: hannes.magnusson@gmail.com ("Hannes Magnusson") 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.. -Hannes