On 4 October 2015 at 09:54, Andrea Faulds <a...@ajf.me> wrote:
> If we want to make it avoid duplication,
> okay, then it could be a static method.

Okay, I'll update the RFC to be `Closure::fromCallable()` rather than
a function.

I was hoping to have something less verbose than that, but you're
probably right when you say we ought to do that properly with it's own
syntax rather than just a function.

Oh using a static method will rule out being able to alias the
function with the use function syntax.

use function closure as _; //can work
use function Closure::fromCallable as _; //doesn't work

Which is slightly annoying but ¯\_(ツ)_/¯

Additionally, I linked to the wrong branch in the RFC. It should be:
https://github.com/php/php-src/compare/master...Danack:closureSimpler

cheers
Dan

--
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to