Re: Not autoloading functions
| From: | Paul Jones | Date: | Fri, 20 Jan 2017 18:15:12 +0000 |
| Subject: | Re: Not autoloading functions | ||
| References: | 1 | Groups: | php.internals |
| Request: | Send a blank email to internals+get-97896@lists.php.net to get a copy of this message | ||
> On Jan 20, 2017, at 01:04, Rasmus Schultz <rasmus@mindplay.dk> wrote:
>
> Just a quick thought.
>
> Since the autoloading functions proposal is stalled, how about allowing for
> import of static functions instead?
>
> use function Foo::bar;
>
> bar(); // calls Foo::bar()
>
...
> at least we can move ahead
> and leverage existing code without changes or BC breaks. It's not all bad.
> It's better than nothing perhaps? :-)
I find this intuitively appealing. It's an incremental change with tangible benefit in an
imaginable timeframe, as vs a dramatic change in an unknowable timeframe.
However, I am not an internals expert, so I'll leave it to them to say how big a deal it would
be to implement, and what the drawbacks are.
--
Paul M. Jones
pmjones88@gmail.com
http://paul-m-jones.com
Modernizing Legacy Applications in PHP
https://leanpub.com/mlaphp
Solving the N+1 Problem in PHP
https://leanpub.com/sn1php