Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:40474 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 94293 invoked from network); 11 Sep 2008 19:35:47 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 11 Sep 2008 19:35:47 -0000 Authentication-Results: pb1.pair.com smtp.mail=greg@chiaraquartet.net; spf=permerror; sender-id=unknown Authentication-Results: pb1.pair.com header.from=greg@chiaraquartet.net; sender-id=unknown Received-SPF: error (pb1.pair.com: domain chiaraquartet.net from 208.83.222.18 cause and error) X-PHP-List-Original-Sender: greg@chiaraquartet.net X-Host-Fingerprint: 208.83.222.18 unknown Linux 2.6 Received: from [208.83.222.18] ([208.83.222.18:50481] helo=mail.bluga.net) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id CF/7A-42936-11379C84 for ; Thu, 11 Sep 2008 15:35:46 -0400 Received: from mail.bluga.net (localhost.localdomain [127.0.0.1]) by mail.bluga.net (Postfix) with ESMTP id 591F9C0E2A3; Thu, 11 Sep 2008 12:34:57 -0700 (MST) Received: from pcp041155pcs.unl.edu (pcp041155pcs.unl.edu [129.93.124.94]) (using SSLv3 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mail.bluga.net (Postfix) with ESMTP id 0BF5FC0E29A; Thu, 11 Sep 2008 12:34:56 -0700 (MST) Message-ID: <48C9730E.6070806@chiaraquartet.net> Date: Thu, 11 Sep 2008 14:35:42 -0500 User-Agent: Thunderbird 2.0.0.6 (Macintosh/20070807) MIME-Version: 1.0 To: Stan Vassilev | FM CC: internals@lists.php.net References: <48C94F10.1000508@chiaraquartet.net> <62D4E81A9E5247379E45F18BFEC7D3FF@pc> In-Reply-To: <62D4E81A9E5247379E45F18BFEC7D3FF@pc> Content-Type: text/plain; charset=windows-1251 Content-Transfer-Encoding: 7bit X-Virus-Scanned: ClamAV using ClamSMTP Subject: Re: [PHP-DEV] Re: Scoping of "use" statements and a strategy for 5.3/6.0 release of namespace From: greg@chiaraquartet.net (Greg Beaver) Stan Vassilev | FM wrote: >> Stan Vassilev | FM wrote: >>> Hi, >>> >>> Multiple namespaces per file were introduced to allow certain >>> workflows in PEAR and frameworks like Symphony which can combine >>> multiple classes and namespaces in a single package. >>> >>> They work like this: >>> >>> >>> namespace X; >>> >>> ... >>> >>> namespace Y; >>> >>> ... >>> >>> >>> The problem is, no one thought of scoping "use" statements, so now >>> those merged files share their "use" imports, thus breaking all the >>> code where collisions occur. >> >> Hi, >> >> Stan, did you actually try this out? According to my checkout of CVS, >> you're wrong. Try this script: >> > > What's the logic behind namespace declaration affecting file-level > import statements. Looks like such a hack to me. ??? I'm confused. First you say that merged files share "use" imports, which is not true, then complain that namespace declaration affects file-level import statements. Which one is the problem? Greg Greg