Re: [RFC] [Discussion] Short Closures

From: Date: Thu, 03 Sep 2015 10:47:13 +0000
Subject: Re: [RFC] [Discussion] Short Closures
References: 1 2  Groups: php.internals 
Request: Send a blank email to internals+get-88030@lists.php.net to get a copy of this message
Dan Cryer wrote on 03/09/2015 11:40:
Out of interest, is there a technical reason you couldn't use an existing token, such as => for this?
https://wiki.php.net/rfc/short_closures#symbol_choice In particular, note that this is already valid code: [$x => $x * 2] (A one-element array, specifying the key) But with the proposal, this would also be perfectly reasonable: [$x ~> $x * 2] (A one-element array containing a closure) So clearly they couldn't share the same syntax. Regards, -- Rowan Collins [IMSoP]

« previous php.internals (#88030) next »