Daniel T. Gorski wrote:

Escpecially due to the new OO features of PHP 5, namespaces are urgently
required for writers of independent libraries which should not clash.

I would claim exactly the opposite.

That's because you already get scoping on names, for free, when you use objects. The method and field names. Of course, for static methods and fields you'll need to reference the class name again ... so don't do that :-)

There would typically be a one time 'hit' in your code for a long, prefixed named used as a constructor, or possibly a static method called on a factory. After that, if you're dealing with object instances, then instead of function names (which would need to also use a longish prefix, because they are scoped globally), you can use plain old short method names.

--
[EMAIL PROTECTED]
IBM PHP Community Architect, IBM Research Triangle Park

--
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to