Re: [RFC] Square bracket syntax for array destructuring assignment

From: Date: Fri, 08 Apr 2016 10:17:43 +0000
Subject: Re: [RFC] Square bracket syntax for array destructuring assignment
References: 1 2  Groups: php.internals 
Request: Send a blank email to internals+get-92170@lists.php.net to get a copy of this message
On 08/04/2016 08:43, Ivan Enderlin wrote:
Most of the time, arrays or vectors constructing are represented by […] symbols while destructing are represented by {…}. What your point of view or arguments here?
When you say "most of the time", do you mean in other languages? Which other languages? Importantly, do those other languages have similar semantics to PHP? I'm reminded me of the suggestion that PHP short array syntax should look more like JSON, which to me would be a terrible idea, because PHP arrays have very different behaviour from JavaScript objects, on which JSON is modelled. Regards, -- Rowan Collins [IMSoP]

« previous php.internals (#92170) next »