On Thu, 2 Jan 2020 at 05:37, tyson andre <tysonandre...@hotmail.com> wrote:

> Out of scope of this RFC: I had a thought today about autoloading.
> I'd rather improve function / const autoloading instead of moving to
> classes.
> What if an ambiguous function_name() or const outside the global
> namespace would attempt to autoload *ambiguous* functions in the global
> scope,
> but not the current namespace?
> (and autoload unambiguous functions in their respective scope)
>


Could you expand on what you mean by "ambiguous" / "unambiguous" here?

I think any nuance to which function is autoloaded needs to match the
actual name resolution - it wouldn't make much sense for some_function() to
call CurrentNS\some_function if already defined, but trigger an autoloader
for \some_function if not. There may be simplifications with the proposed
directive from this RFC, but we'd need to think through the different
combinations and make sure they behaved consistently and intuitively.

Regards,
-- 
Rowan Tommins
[IMSoP]

Reply via email to