Namespaces are really useful and PHP had no support for them until the recent few releases, AFAIK.
When I'm using Zend Framework, I have to remember long names with underscores - like Zend_Form_Element_Button
or Zend_Form_Decorator_HtmlTag
and so on.
If I use namespaces, this might be possible, and so much easier:
namespace Zend { class something { // ... } } namespace Zend\Form { class something { // ... } } namespace Zend\Form\Element { class Button { // ... } }
And to use it I do this:
use Zend\Form\Element\Button; $btn1 = new Button();
So my question is, is it trivially possible, given the autoloader system and a lot of meta-class "black magic" that lives inside Zend Framework, to rewrite the structure of the code using namespaces, and then have more sensible class names?
The problem is not the length of the class names - Eclipse/Netbeans/Aptana handle that very well, it is the irritant that long names are.
Tends to get confusing after some time if some classes you use have similar parts in the names.
Since ZF is open source licensed, I don't think Zend would mind a namespaced version of the code, if mere renaming and some re-organization of code can achieve that.