Hi Björn
>>> I'd like to announce the match expression v2 RFC:
>>> https://wiki.php.net/rfc/match_expression_v2
>
> I do like this RFC and have one comment. Would it be suitable
> to have : as a separator instead of =>?
`=>` is usually used in combination expressions (arrays, yield, arrow
functions). `:` is mostly used for switch cases and the alternative
control structure syntax [1]. `=>` also visually separates the
condition and expression better IMO. This has been suggested once
before but that's not enough for me to change it at this point.
> When reading the Future scope of the RFC I noted that arrow
> functions was part of that, so are we here overloading the usage
> of the '=>' symbol?
The future scope mentions possible block support for arrow functions
in the future (`fn() => {}`) but we use arrows or colons in match
doesn't matter.
Thanks for your feedback! :)
Ilija
[1] https://www.php.net/manual/en/control-structures.alternative-syntax.php
--
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: https://www.php.net/unsub.php