Re: [RFC] New core autoloading mechanism with support for function autoloading
| From: | Sara Golemon | Date: | Tue, 11 Apr 2023 11:42:25 +0000 |
| Subject: | Re: [RFC] New core autoloading mechanism with support for function autoloading | ||
| References: | 1 | Groups: | php.internals |
| Request: | Send a blank email to internals+get-119908@lists.php.net to get a copy of this message | ||
> On Apr 10, 2023, at 07:17, G. P. B. <george.banyard@gmail.com> wrote:
>
> Hello Internals,
>
> Dan and I would like to propose a new core autoloading mechanism that fixes
> some minor design issues with the current class autoloading mechanism and
> introduce a brand-new function autoloading mechanism:
> https://wiki.php.net/rfc/core-autoloading
At a high level: +1, would vote for again (I think I voted for this last time it came up...)
Initial thoughts, mostly based on replies so far:
1/ There's certainly some bike-shedding for the names to do. Good points have already been
made and I won't belabor them.
2/ I'm unconcerned by the edge case brought up about load ordering as I feel that having
multiple definitions of a single function name in an autoload friendly codebase grouped in files
which permit this kind of shenanigans is a technical possibility, but a practical absurdity. Nobody
should be designing traps like that.
3/ Pinning concerns me a little, and we should certainly build some strong unittests to validate
behavior here, but I'm confident that can be resolved during implementation.
4/ If nothing else, I just look forward to gaining consistency here. autoloading being exclusive to
classes has long annoyed me, just not quite to the point of action. :)
-Sara