Re: [RFC]Discuss] Syntax for Arrow Functions

From: Date: Mon, 19 Jun 2017 20:12:17 +0000
Subject: Re: [RFC]Discuss] Syntax for Arrow Functions
References: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16  Groups: php.internals 
Request: Send a blank email to internals+get-99562@lists.php.net to get a copy of this message
On 06/19/2017 03:45 PM, Rasmus Schultz wrote:
Or maybe it'll look okay if you format the code?
     $things->forEach({$v => {
         foo($v);
         bar($v);
     }});
Still looks kinda crazy with the closing "}})" though...
Multi-line lambdas should use the existing syntax without changes. The only thing being discussed here is single-statement lambdas that you would want to inline and think of as an expression rather than a function call. If you need something more complex than that just use the existing syntax. --Larry Garfield

« previous php.internals (#99562) next »