Hi!

You know, there is a world out there too, outside the "deep and wide
class hierarchies". I really doubt that namespaces were introduced in
the language with the sole purpose of grouping hundreds of classes. But
you can, if you make everything a class.

Of course, you know much more that I do about why namespaces were introduced, but while there is indeed wide world out there, namespaces aren't meant to be everything to everybody in this world. They were meant to solve specific problem, which is management of name hierarchies, because as they grew wider and deeper, names grew longer and more complex to avoid name collisions, and that became a serious nuisance. You can, of course, use namespaces for other things, but renaming strlen() doesn't seem to me being worth it.

Here
http://www.php.net/~derick/meeting-notes.html#type-hinted-properties-and-return-values.
But this may be outdated, sorry if I may not know well.

Since 2005 a lot happened... return type hints still don't have consensus required to introduce them, and ample discussion can be found in the archives if you are interested in the reason why.

When I said global namespace, I meant outside any class as well, where
we would normally use /define/. My focus was that constants are not

So why not use define()?
--
Stanislav Malyshev, Zend Software Architect
s...@zend.com   http://www.zend.com/
(408)253-8829   MSN: s...@zend.com

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

Reply via email to