PHP is a wonderfully flexible and powerful language, but it's notorious for having a very polluted global namespace and no way to define separate namespaces other than wrapping things in classes. Users have been begging for a better solution for years, but to no avail. It looks like that may finally change, though.
The release of PHP 5.1.0 just before Thanksgiving introduced a new native Date class for (not surprisingly) manipulating dates and times. Unfortunately, PHP's developers either didn't notice or didn't care that there was already a very popular PEAR class called Date. So anyone who was using the PEAR Date class and upgraded to PHP 5.1.0 suddenly found themselves using an entirely different and incompatible native Date class, which broke hundreds, if not thousands, of applications.
The PHP mailing lists were instantly abuzz with users complaining about the breakage and developers proposing half-baked ideas for solving the problem by — at long last — introducing namespaces. Thankfully, cooler heads realized that namespaces are a big change and the most important thing was to fix the immediate problem, so PHP 5.1.1 was quickly released minus the new Date class.
This incident seems to have hammered home to the PHP team just how important namespaces are and how painful it is to try and design a language as big as PHP without them. Maybe after this they'll finally get their shit together and add namespaces in PHP 6.
Comments
Today's namespace is
The "snow" namespace, which is used when defining "sledding," "cold white stuff," "snow flakes," and today it also defines what is distracting me out my office window. Now if some fool will try (and fail) to drive up the sledding hill, my entertainment will be complete.
Namespaces were supposed to go in...
Im also waiting for namespaces too
Lets hope they sort stuff out by PHP 6.
When they develop PHP 6, I hope the developers forget backwards compatability and move forwards to a fully object oriented approach with standardised naming conventions.
I hate it when I have to look at the manual to remember what naming convention they use, underscore_spaced - nospaces - camelHump. I prefer camel hump personally because it is used in Java.
Namespaces are just as annoying as lack of naming standards, and I also don't like mixing functions with objects all the time.
I also hope they make strings be passed by references automatically like they do with arrays and objects. Maybe I have been using Java too much but in a perfect world I would never have to worry about whether to pass a string/array/object by reference or not for performance purposes. If programmers want a copy of it, let them create one themselves.