Re: An implementation of a short syntax for closures
| From: | Ryan McCue | Date: | Thu, 04 Aug 2011 11:18:44 +0000 |
| Subject: | Re: An implementation of a short syntax for closures | ||
| References: | 1 2 3 | Groups: | php.internals |
| Request: | Send a blank email to internals+get-54348@lists.php.net to get a copy of this message | ||
Lazare Inepologlou wrote:
> Thank you for your interest. This is just a proposal that I have tested and
> works. Of course, the final syntax can be different. Syntax is always a
> matter of taste :-)
As much as I love the idea, I have to agree that using | doesn't really
make sense here and actually makes the readability worse, IMO. However,
I can't really think of a better operator. ( $x ) => $x + 1 for example
would be ambiguous if used in an array definition, but is otherwise the
best in terms of readability.
--
Ryan McCue
<http://ryanmccue.info/>