On Wed, Oct 21, 2020, at 5:17 PM, Rowan Tommins wrote: > It occurred to me recently that maybe we could make "function" and "fn" > synonyms everywhere, i.e. make both "$double = function($x) => $x *2;" > and "$double = fn($x) use ($x) { return $x *2; };" valid. I'm not sure > if that's desirable, or even if there's a reason it can't be done, but > it would mean you don't have to make a decision on this RFC...
Sara mentioned that as well. I can see the appeal, but at the same time I foresee that leading to a question about when to use which, divergent coding standards with different people doing it differently and different projects eventually adopting different standards, eventually a PSR that attempts to standardize it, probably by proposing the same "when it's a short-function of some kind" rule, and only some projects adopt it. Basically, a mess. Whatever we do, it should be language-consistent so that there's no bikeshed potential. --Larry Garfield -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: https://www.php.net/unsub.php