There was a really big argument at the time, the crux of which was that since the PHP parser isn't context aware they had to use a symbol that wasn't used elsewhere. :: is used for static calls, . is used for concatenation.
So the choice ended up being between ::: and the backslash, the backslash being chosen because it is easier to type.
Would like to add that the other best choice single colon ":" might have been a good candidate too. But PHP 5.3 also introduced the age old goto command, and colon was assigned to for labeling goto targets.
I'm just looking at php nowadays and, after having worked with it for many years, have just decided that I want server-side javascript. The new features are nice, but the language itself is still scattered and inconsistent in areas.
7 comments
[ 7.1 ms ] story [ 30.0 ms ] threadNow php 5.3 has lambdas, 'pharchives' :] and namespaces plus other goodness...
I wonder why they used a slash as the namespace scope clarifier - why not '::' or just '.' ?
I'm not dissing PHP, Ive used it, its handy, fast sturdy, ubiquitous.. but you feel the syntax works against you.
So the choice ended up being between ::: and the backslash, the backslash being chosen because it is easier to type.
There's a lot of interesting work being done at http://groups.google.com/group/serverjs?hl=en and https://wiki.mozilla.org/ServerJS