Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:41219 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 7885 invoked from network); 17 Oct 2008 14:35:40 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 17 Oct 2008 14:35:40 -0000 X-Host-Fingerprint: 64.8.134.189 unknown Received: from [64.8.134.189] ([64.8.134.189:19350] helo=localhost.localdomain) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 63/BA-57950-BB2A8F84 for ; Fri, 17 Oct 2008 10:35:40 -0400 Message-ID: <63.BA.57950.BB2A8F84@pb1.pair.com> To: internals@lists.php.net Date: Fri, 17 Oct 2008 09:35:37 -0500 User-Agent: Thunderbird 2.0.0.14 (Windows/20080421) MIME-Version: 1.0 References: <48F653FF.5010106@chiaraquartet.net> In-Reply-To: <48F653FF.5010106@chiaraquartet.net> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Posted-By: 64.8.134.189 Subject: Re: my last attempt at sanity with namespaces From: rpanning@gmail.com (Ryan Panning) Greg Beaver wrote: > Hi, > > http://wiki.php.net/rfc/namespaceissues > > Read it and discuss. Let's be clear people: the technical problems in > namespaces are limited and solvable. The problems in the political > environment surrounding them may not be. Wouldn't politics be a > stupid-ass reason to remove namespaces? > > Greg Issue A: #2 Issue B: Yes The reason I like #2 is because it also helps with the autoload confusion. It will clearly state that you are either looking for a class or namespace file, by looking for the element separator. However, I think :> or something other than ::: would be a better separator, for better visability. Ex: Request Autoload Gets Type ----------------------------------------------- A::B:>C A::B:>C Class A::B:>func() A::B Namespace A::B:>C::CONST A::B:>C Class A::B::C:>D::method() A::B::C:>D Class A::B::C::D:>CONST A::B::C::D Namespace Question for issue B, will the change only effect class requests? Or would it also trigger autoload for function requests (thinking it's a namespace request)? I could see that being a problem as 90% of function requests are for internal functions and ::func() for everything would be a pain. Similar goes for namespace function/const requests. At this point it wouldn't be a big deal but lets say core internal functions are migrated to namespaces (ex: Array::map()). Does that trigger autoload before it finds the internal Array::map()? I'm thinking that's where option #3 comes into play, but "using .." every internal class/ns/func would also be a pain. Sorry if this was already answered, I've been trying to keep up. :)