Re: alpha2 scheduled

From: Date: Fri, 29 Aug 2008 12:24:12 +0000
Subject: Re: alpha2 scheduled
References: 1 2 3 4 5 6 7  Groups: php.internals 
Request: Send a blank email to internals+get-40131@lists.php.net to get a copy of this message
Hello Stanislav, Thursday, August 28, 2008, 7:43:04 PM, you wrote: > Hi! >> I'm really sorry, but I have to ask. >> Since you can detect that this is a nested namespace, why can't we allow it? > Because that's not how model was designed and it creates all kind of It wasn't designed to have multiple namespaces at all to begin with. But as now have them we should at least think of what we want... > trouble with name resolution. Basically, you get potentially infinite > resolution path. You don't want to go there. And frankly, there's > absolutely no need. How so? namespace foo { namespace bar { class baz {} } } According to your won words it is all about name substitution. Explicitly you were talking about simple text replacement. Now that in mind I see and easy replacement here. That is 'bar' becomes 'foo::bar' and 'baz' obviously becomes 'foo::bar::baz' or can you find something else? Actually we already have this: namespace foo; namespace foo::bar; class baz {} And that does exactly what I described above. But maybe I just to stupid :-) Best regards, Marcus

« previous php.internals (#40131) next »