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
>
> 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
> 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
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
> 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
>
> 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
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
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
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 *":
-