Re: solving the namespace conflict issues betweenfunction/staticmethod class constant/ns constant

From: Date: Sat, 04 Oct 2008 03:44:12 +0000
Subject: Re: solving the namespace conflict issues betweenfunction/staticmethod class constant/ns constant
References: 1 2 3 4 5 6 7 8 9 10 11 12  Groups: php.internals 
Request: Send a blank email to internals+get-40854@lists.php.net to get a copy of this message
This is a dangerous comment. Again to make it clear, with a single separator, whatever it may we, we will still have ambiguity. Only with two different separators as Greg describes can we really solve this problem. But yes, we I presume what you mean to say is that if we want to improve the situation we have to find a second separator.
I wish I had Derick's guts to just say 'classes only, forever'. It's simpler and cleaner that way, and it's more like the PHP I know and love. But the way things are going, the PHP I know and love isn't the PHP that's waiting just over the horizon anyway. T_SHALOSH_PIAMIM_NEKUDOTAYIM would solve the problem of ambiguity in namespace elements, isn't used already, and hopefully would be pretty clear to humans even outside Israel. ::: has the advantage that it says "something bigger than a class". And it's relatively easy to check for in the Engine too. But it's one heck of a mouthful :) I'm less happy about retaining the global accessor as ::, and I definitely don't like the look of nested namespaces that use paamayim nekudotayim as a separator, because 'scope resolution operator' still means 'classes' to me. But at least I understand (now) why this is necessary if functions/constants are to be supported, and if I can understand it it must be easy to document it. @Lukas: tell me when. - Steph

« previous php.internals (#40854) next »