Elizabeth M Smith schreef:
Stanislav Malyshev wrote:
Hi!
Personally I don't see the point of of having functions in namespaces if
you can't "use" them in a global scope.
You mean, if you can do foo() it has a point but if it's F::foo() it
doesn't? Then I think your point was purely cosmetical from the start
and wasn't real either way. Saving 3-4 keystrokes was never a major goal.
namespaces weren't really meant as mechanism to replace functions in
code without anybody noticing - they are not that hack. It might be a
neat hack for some uses - but I just don't think it has anything to do
with namespaces.
Depends on what you think namespaces are for.
For me they are ways to "package up" code without interfering with built
in PHP functions or other libraries I wish to use.
I don't want to retrain myself or others to call all functions in my
code as though they were static methods. I want to be able to have
functions with the same names as php functions without prefixing or
other extra typing - not because it saves keystrokes, but because it's
confusing - is that a function call or a method call?
ofcourse that whole issues actually arises from the brilliant decision
to use '::' as the namespace resolution operator. not that functions
shouldn't be fully aliasable if classes can be.
Thanks,
Elizabeth
--
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: http://www.php.net/unsub.php