Re: [RFC][DISCUSSION] Deprecation of fallback to root scope

From: Date: Mon, 05 Feb 2018 13:18:38 +0000
Subject: Re: [RFC][DISCUSSION] Deprecation of fallback to root scope
References: 1 2 3 4 5  Groups: php.internals 
Request: Send a blank email to internals+get-101771@lists.php.net to get a copy of this message
On 5 February 2018 at 12:54, Marco Pivetta <ocramius@gmail.com> wrote: > On Mon, Feb 5, 2018 at 1:52 PM, Rowan Collins <rowan.collins@gmail.com> > wrote: > >> None of these options is particularly appealing, and this will all be for >> a >> hypothetical future improvement to the language. >> > > Would proposing a function autoloading RFC together with this improve the > situation? > I think it would, firstly because it gives a visible benefit to the change we would be asking users to make, and secondly because it allows a shim like the example in the RFC to be used immediately as a transition. As I mentioned in an aside previously, it would also make an opt-in statement more reasonable, because saying "namespace Foo\Bar with autoload" could both turn off the fallback lookup and turn on autoloading functions in the current namespace. Fully-qualified function names could be autoloaded in both modes, and presumably functions explicitly imported with "use" could be too. Regards, -- Rowan Collins [IMSoP]

« previous php.internals (#101771) next »