On 13-02-2020 19:19, Mike Schinkel wrote:
> But since I seem to be in the minority of caring about the name, let me
> propose the following which was influenced by Larry Garfield's most recent
> post. Since it seems that people want the convenience of a short notation to
> get a closure, how about this:
>
> function foo{}
>
> foo::function — Returns name of function
> foo::fn — Returns closure for function
>
> Since using `fn` creates anonymous function closures it kinda makes sense
> that `::fn` would return a closure.
That is somewhat confusing in my opinion, the two class constants are
too similar. I would rather prefer:
foo::function — Returns name of function
foo::closure — Returns closure for function
Regards,
Dik Takken
--
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: http://www.php.net/unsub.php