On Thursday, April 11, 2019 at 10:22 AM Fabien S <fabacr...@gmail.com> wrote:

> I really like the Haskell `\($x)` syntax, could someone confirm if
> it would possible to drop the parenthesis (like `\$x`) if we have
> one argument ?

The RFC says this syntax is ambiguous without the parentheses, since
the `\` may also be part of a fully qualified type name. [1]

I'm not sure whether it would work if the single parameter isn't typed.

I like the Haskell syntax as well, but I'd also be okay with the `fn`
keyword if that's what others prefer.

[1]: https://wiki.php.net/rfc/arrow_functions_v2#miscellaneous

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

Reply via email to