Re: RFC: Short syntax for Arrays (redux)

From: Date: Tue, 31 May 2011 21:59:55 +0000
Subject: Re: RFC: Short syntax for Arrays (redux)
References: 1 2 3 4  Groups: php.internals 
Request: Send a blank email to internals+get-52597@lists.php.net to get a copy of this message
On 05/31/2011 02:45 PM, Ilia Alshanetsky wrote: > Rasmus, > > Don't you think having support for both ['a':1, 'b':2] and > {'a':1, > 'b':2} would create confusion? Not if we present this as native json support in PHP. Then we have to support the {} version. Other than a couple of grumpy old-timers, I think we are in agreement that we should add a short array syntax. Whether we should extend that to also add a short object syntax is a secondary question. Just as a data point, I gave a presentation in Mexico a couple of days ago to a couple of hundred kids where I went over the accepted new features in 5.4 and also a short list of features under discussion, and this short array syntax got the most applause by far. It is much harder to explain traits than this feature. -Rasmus

« previous php.internals (#52597) next »