Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:41768 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 73824 invoked from network); 7 Nov 2008 21:49:47 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 7 Nov 2008 21:49:47 -0000 Authentication-Results: pb1.pair.com header.from=sv_forums@fmethod.com; sender-id=unknown Authentication-Results: pb1.pair.com smtp.mail=sv_forums@fmethod.com; spf=permerror; sender-id=unknown Received-SPF: error (pb1.pair.com: domain fmethod.com from 69.16.228.148 cause and error) X-PHP-List-Original-Sender: sv_forums@fmethod.com X-Host-Fingerprint: 69.16.228.148 unknown Linux 2.4/2.6 Received: from [69.16.228.148] ([69.16.228.148:55738] helo=host.fmethod.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 34/41-02726-BF7B4194 for ; Fri, 07 Nov 2008 16:49:47 -0500 Received: from [83.228.56.37] (port=1368 helo=pc) by host.fmethod.com with esmtpa (Exim 4.69) (envelope-from ) id 1KyZD6-0004eC-OB for internals@lists.php.net; Fri, 07 Nov 2008 15:49:45 -0600 Message-ID: <133EA0E5E36C4DE7AED0E98418B6E4AE@pc> To: "internals Mailing List" References: <4914AFCA.40307@chiaraquartet.net> Date: Fri, 7 Nov 2008 23:49:36 +0200 MIME-Version: 1.0 Content-Type: text/plain; format=flowed; charset="iso-8859-1"; reply-type=original Content-Transfer-Encoding: 7bit X-Priority: 3 X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook Express 6.00.2900.5512 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.5579 X-AntiAbuse: This header was added to track abuse, please include it with any abuse report X-AntiAbuse: Primary Hostname - host.fmethod.com X-AntiAbuse: Original Domain - lists.php.net X-AntiAbuse: Originator/Caller UID/GID - [47 12] / [47 12] X-AntiAbuse: Sender Address Domain - fmethod.com Subject: Re: [PHP-DEV] [PATCH] bracketed namespace declarations From: sv_forums@fmethod.com ("Stan Vassilev | FM") Sorry for the second email, I just forgot to mention something regarding how use statements apply from global scope to namespace x {}. The best way regarding realworld usage and existing state of the art would be to take into account the use statements in the scope above and apply the use statements inside the scope after them. So if I write this: In the namespace, it's the same as if I wrote use A, B, C in that order explicitly. Implemented this way, in a future version of PHP we could allow this typical scenario (which I suspect won't work with this patch?): Which code above is in fact a sugared version of what is actually happening: The above significantly helps with larger function/class libraries in a single file, as you can make your use statements more local (typically you will use certain classes globally, and most locally in a function/method), and is supported by most modern languages that handle namespaces. Regards, Stan Vassilev