Re: Proposal: Array syntax

From: Date: Wed, 05 Nov 2003 20:40:32 +0000
Subject: Re: Proposal: Array syntax
References: 1  Groups: php.internals 
Request: Send a blank email to internals+get-5270@lists.php.net to get a copy of this message
Rasmus Lerdorf wrote:
On Wed, 5 Nov 2003, Christian Schneider wrote:
Ok, a quick head count gave 9 people pro, 6 people con and 3 people I couldn't figure out if they are pro or con (-:C
In case it wasn't clear, I am a -0 on this. I don't mind the syntax, but having two different syntaxes is the big problem here.
That's the way I think, too. It's not really that bad, except there's already a way to define arrays (array()). There's really no point in adding a second way that doesn't really bring any benefits besides slightly shorter syntax, and it's totally unfeasable to remove the array() syntax. Also, the fact that [] are used for array indexes means it's more confusing when they're also used in a very similar context of defining the actual array. Marco's example $a = [1,2,$b[11]]; I think best illustrates this point. -1 on this. -- Greg MacLellan

« previous php.internals (#5270) next »