2021-05-20 14:48 GMT+02:00, Nikita Popov <nikita....@gmail.com>: > Hi internals, > > I'd like to present an RFC for a first-class callable syntax, which is > intended as a simpler alternative to the partial function application (PFA) > proposal: > > https://wiki.php.net/rfc/first_class_callable_syntax > > See the Rationale section for details on how this relates to PFA. Over the > past week, we've had a lot of discussions on how exactly PFA is supposed to > work (most of them OTR), and while we seem to have a tentative consensus on > the correct model to use (which does not match the current RFC), it's clear > that this feature has turned out more complicated than originally > anticipated. Joe (who provided the implementation for the PFA RFC) is also > concerned about the implementation complexity that the final model would > require. > > At least I personally was mainly interested in PFA because it provides a > first-class callable syntax as a side-effect. This RFC goes back to > providing *just* that. The syntax is forward-compatible with a future PFA > proposal though. > > Regards, > Nikita
More bikeshedding, sorry. Was a syntax using `fn` considered? Like $fn = Closure::fromCallable('strlen'); $fn = fn strlen; or $fn = (fn) strlen; Olle -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: https://www.php.net/unsub.php