Hi!

>>> To get the same benefits (jit and such) wouldn't it be better to introduce
>>> a "use function root;" or similar statement or a declare() to specify this
>>> file imports all root functions?
>>
>> We already have this right now, […]
> 
> Do we?  AFAIK, it is not possible to import *all* functions (or even all
> symbols, for that matter) of a namespace, without explicitly mentioning
> them.

We are talking about global namespace aka standard PHP functions, so it
works out of the box. If you're talking about non-global namespace,
there's no such thing as "all functions of a namespace" at all, and even
if there were, in most cases it's the wrong thing (excepting some rare
cases like you want to override all PHP function for testing, etc.) to
do. Namespaces are meant to keep things separate, so blanket imports
just put us back into a pre-namespace world with all the problems that
existed there.
Granted, there are rare cases - as overriding whole extension or whole
standard library - but they are rare. In overwhelming majority of cases,
this is not what should be done and if you do it, you usually get in
trouble.
-- 
Stas Malyshev
smalys...@gmail.com

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

Reply via email to