Re: Opt-in "use function *;" for skipping check for function/const in alternate namespace

From: Date: Fri, 29 Nov 2019 19:48:37 +0000
Subject: Re: Opt-in "use function *;" for skipping check for function/const in alternate namespace
References: 1 2  Groups: php.internals 
Request: Send a blank email to internals+get-107893@lists.php.net to get a copy of this message
> > 2. Whether this should be part of declare(lookup_functions_in_current_namespace=1) or a > "use" statement, if it does exist Hi, I don’t think it should be a declare() directive, because: * It changes incompatibly the meaning of valid (non-error-throwing) code. The current existing declare() directive, declare(strict_types=*), has the nice property that code that does not throw error in *both* modes does not change behaviour. * When you want to know the FQN of a random identifier, it is necessary and sufficient to look at the “namespace” and the “use” declarations. With use function *, that won’t change. With declare(lookup_functions_somewhere), you have now to look at an additional place. —Claude

« previous php.internals (#107893) next »