Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:41918 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 549 invoked from network); 14 Nov 2008 22:57:18 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 14 Nov 2008 22:57:18 -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 74.125.44.30 cause and error) X-PHP-List-Original-Sender: greg@chiaraquartet.net X-Host-Fingerprint: 74.125.44.30 yx-out-2324.google.com Received: from [74.125.44.30] ([74.125.44.30:18865] helo=yx-out-2324.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 9E/80-07308-E420E194 for ; Fri, 14 Nov 2008 17:57:18 -0500 Received: by yx-out-2324.google.com with SMTP id 3so702106yxj.83 for ; Fri, 14 Nov 2008 14:57:15 -0800 (PST) Received: by 10.64.243.19 with SMTP id q19mr1479736qbh.50.1226703435298; Fri, 14 Nov 2008 14:57:15 -0800 (PST) Received: from ?192.168.0.106? ([76.84.4.101]) by mx.google.com with ESMTPS id s31sm2104704qbs.8.2008.11.14.14.57.13 (version=TLSv1/SSLv3 cipher=RC4-MD5); Fri, 14 Nov 2008 14:57:14 -0800 (PST) Message-ID: <491E0297.20108@chiaraquartet.net> Date: Fri, 14 Nov 2008 16:58:31 -0600 User-Agent: Thunderbird 2.0.0.17 (X11/20080925) MIME-Version: 1.0 To: Marcin Kurzyna CC: internals@lists.php.net, Stan Vassilev | FM , Stanislav Malyshev , Dmitry Stogov References: <49188698.1050505@grudl.com> <49188BD0.9090100@kukulich.net> <4918A3F8.4070809@chiaraquartet.net> <4919A9BD.2020703@grudl.com> <491DE402.4000600@chiaraquartet.net> <72.BB.07308.119ED194@pb1.pair.com> In-Reply-To: <72.BB.07308.119ED194@pb1.pair.com> Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Subject: Re: Namespace resolution rules has been changed? From: greg@chiaraquartet.net (Gregory Beaver) Marcin Kurzyna wrote: > > namespace foo; > > use bar as A; /// ->resolves as A == \foo\bar > use \bar as B; /// ->resolves as B == \bar > > ?> Hi Marcin, Stan also requested this, so it should be considered as a possibility. Personally, I would rather not introduce this land mine. It requires the user to do an implicit prepending of namespace name ("foo") to "bar" in the use statement as well as a translation of "A", which could fast lead to unreadable code. It is probably best to simply require a fully qualified name where it is intended. Thus 1) require leading "\" in use statements 2) allow "namespace\blah" in use statements, as this is a valid fully qualified name. Stas, I'm sure you have an opinion on this? Greg