AW: AW: [PHP-DEV] [RFC] [Discussion] Short Closures
| From: | Robert Stoll | Date: | Mon, 07 Sep 2015 11:45:58 +0000 |
| Subject: | AW: AW: [PHP-DEV] [RFC] [Discussion] Short Closures | ||
| References: | 1 2 3 | Groups: | php.internals |
| Request: | Send a blank email to internals+get-88089@lists.php.net to get a copy of this message | ||
> > I would like to see a short syntax for closures in PHP but would
> > suggest to use different symbols for the operator. Why not use --> ?
> >
>
> --> is a shift-reduce conflict. It's undecidable if this expression
> --> should
> return boolean or a closure:
>
$foo-->$bar (is it $foo -->
> $bar or $foo-- > $bar)
>
> --
You're right, I forgot about the post decrement operator. What about -=> ? would look like
a little rocket ^^ but well, it does not really look better than ~>