3 ms·
>PHP only added namespaces in 5.3.0 and can't modularize their globals into namespaces without causing massive backwards compatibility problems. PHP is stuck wi
by TazeTSchnitzel 14y ago
>PHP only added namespaces in 5.3.0 and can't modularize their globals into namespaces without causing massive backwards compatibility problems. PHP is stuck with a polluted global namespace
They could do what Python did for 3.0, and make a tool similar to Python's 2to3 that replaces global namespace references.
- sirclueless 14y agoThat sounds like a disaster. I don't think anyone wants to follow Python's lead on breaking backwards compatibility without a very good reason. A much better reason than a cluttered namespace.