Re: RFC: Interest in function autoloading?
| From: | tyson andre | Date: | Tue, 17 Mar 2020 03:20:35 +0000 |
| Subject: | Re: RFC: Interest in function autoloading? | ||
| References: | 1 | Groups: | php.internals |
| Request: | Send a blank email to internals+get-109094@lists.php.net to get a copy of this message | ||
> I've searched the archive, but I haven't found anything about this issue.
> I notice there exists an RFC for autoloading of functions, or more to the
> point, a unified autoloading system for classes, functions, constants and
> streams:
Hi Terje,
I'd brought this up 2 months ago in https://externals.io/message/107967 "Autoloading
functions/consts without a performance impact"
One major issue is that foo() can refer to both foo() and NS\foo() from namespace NS,
and there's many different opinions on how/if an autoloader should deal with that, each with
their own drawbacks.
If the ambiguity was avoided, then I think more people would be open to autoloading for
functions/constants.
I had proposed one option for avoiding ambiguity for functions and constants, which was rejected: https://wiki.php.net/rfc/use_global_elements
I don't think the proposed alternatives would reach a 2/3 majority either if voted on, though,
but may be mistaken.
- Tyson