Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:38060 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 50260 invoked from network); 1 Jun 2008 17:51:25 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 1 Jun 2008 17:51:25 -0000 Authentication-Results: pb1.pair.com header.from=stas@zend.com; sender-id=pass Authentication-Results: pb1.pair.com smtp.mail=stas@zend.com; spf=pass; sender-id=pass Received-SPF: pass (pb1.pair.com: domain zend.com designates 212.25.124.162 as permitted sender) X-PHP-List-Original-Sender: stas@zend.com X-Host-Fingerprint: 212.25.124.162 mail.zend.com Windows 2000 SP4, XP SP1 Received: from [212.25.124.162] ([212.25.124.162:57637] helo=mx1.zend.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 75/92-35077-B91E2484 for ; Sun, 01 Jun 2008 13:51:25 -0400 Received: from us-ex1.zend.com ([192.168.16.5]) by mx1.zend.com with Microsoft SMTPSVC(6.0.3790.3959); Sun, 1 Jun 2008 20:52:35 +0300 Received: from [192.168.17.83] ([192.168.17.83]) by us-ex1.zend.com with Microsoft SMTPSVC(6.0.3790.3959); Sun, 1 Jun 2008 10:44:35 -0700 Message-ID: <4842DFB2.8050002@zend.com> Date: Sun, 01 Jun 2008 20:43:14 +0300 Organization: Zend Technologies User-Agent: Thunderbird 2.0.0.14 (Windows/20080421) MIME-Version: 1.0 To: Hannes Magnusson CC: PHP Internals References: <4842C9AF.6040803@zend.com> <7f3ed2c30806010943k79790024hf0e83bf5ea5a5340@mail.gmail.com> <4842D84D.50509@zend.com> <7f3ed2c30806011030q73608bfo40ce3bddbb80f56d@mail.gmail.com> In-Reply-To: <7f3ed2c30806011030q73608bfo40ce3bddbb80f56d@mail.gmail.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-OriginalArrivalTime: 01 Jun 2008 17:44:36.0048 (UTC) FILETIME=[28582D00:01C8C40F] Subject: Re: [PHP-DEV] multiple use From: stas@zend.com (Stanislav Malyshev) 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; > You are comparing apples and oranges. Do we allow foreach($array as > $key => $arrayval as $key2 => $val) ? What foreach has to do with it? Foreach doesn't allow multiple elements at all. But definitions that do - like const, static, var, etc. - allow commas. -- Stanislav Malyshev, Zend Software Architect stas@zend.com http://www.zend.com/ (408)253-8829 MSN: stas@zend.com