Re: Re: [RFC] "use global functions/consts" statement
| From: | Mike Schinkel | Date: | Thu, 02 Jan 2020 16:52:43 +0000 |
| Subject: | Re: Re: [RFC] "use global functions/consts" statement | ||
| References: | 1 2 | Groups: | php.internals |
| Request: | Send a blank email to internals+get-107960@lists.php.net to get a copy of this message | ||
> On Jan 1, 2020, at 11:31 PM, Mark Randall <marandall@php.net> wrote:
> In future, I think the optimal solution is opt-in deprecating fallback to the root namespace
> using a declare. We might eventually benefit from versioned "libraries" of functions that
> can be imported in one command which would solve many-a-future-problem by itself.
+1 to that.
Especially if there is a mechanism to define functions from other people's code to be included
in those "libraries", such as the functions in the WordPress API.
> Id like to see nikic/scalar_objects added to the core in 8.0, that would offer non-procedural
> (and therefore non-namespaced) access to many of the most common global functions (strings, arrays
> etc). In turn, that would allow developers to limit the number of use \... statements.
And +1000 to that!
-Mike