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

2019-11-30 Thread Rowan Tommins
On 29 November 2019 19:48:37 GMT+00:00, Claude Pache wrote: >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

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

2019-11-29 Thread Claude Pache
> > 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

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

2019-11-28 Thread Claude Pache
> Le 28 nov. 2019 à 12:56, Rowan Tommins a écrit : > > On Thu, 28 Nov 2019 at 11:01, Claude Pache wrote: >> I think it is better to keep the language as regular as possible, and > consider that every non-fully-qualified name is relative to the current > namespace, unless there is an explicit

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

2019-11-28 Thread Rowan Tommins
On Thu, 28 Nov 2019 at 11:01, Claude Pache wrote: > I think it is better to keep the language as regular as possible, and consider that every non-fully-qualified name is relative to the current namespace, unless there is an explicit `use` declaration that says otherwise That's already false, and

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

2019-11-28 Thread Claude Pache
> Le 28 nov. 2019 à 10:35, Rowan Tommins a écrit : > > On Thu, 28 Nov 2019 at 00:02, tyson andre wrote: > >> - Due to the absence of function autoloading (not supported in php to >> performance overhead), functions outside the global scope are rare in >> practice. >> > > > If this is a

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

2019-11-28 Thread Robert Hickman
> > What are your thoughts about syntax such as the following, similar to the > syntax for Java (only for use of functions/constants from the root scope) > > namespace My\NS; > use function *; > use const *; > // can use functions/constants from namespaces that aren't the global > namespace to

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

2019-11-28 Thread Rowan Tommins
On Thu, 28 Nov 2019 at 00:02, tyson andre wrote: > - Due to the absence of function autoloading (not supported in php to > performance overhead), functions outside the global scope are rare in > practice. > If this is a valid justification, perhaps we should do the opposite of the "deprecate

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

2019-11-28 Thread Benjamin Eberlei
On Thu, Nov 28, 2019 at 1:02 AM tyson andre wrote: > > What are your thoughts about syntax such as the following, similar to the > syntax for Java (only for use of functions/constants from the root scope) > > namespace My\NS; > use function *; > use const *; > // can use functions/constants

[PHP-DEV] Opt-in "use function *;" for skipping check for function/const in alternate namespace

2019-11-27 Thread tyson andre
What are your thoughts about syntax such as the following, similar to the syntax for Java (only for use of functions/constants from the root scope) https://marc.info/?l=php-internals=151788196501507=2 . (I couldn't find any other mentions after a quick search) Benefits of "use function *": -