On 11/04/2013 20:45, Dave Glasser wrote:


Yes, I think it matters quite a bit. It would be very easy for someone, even in their right mind, to unintentionally have an extra comma somewhere in the middle of a long array literal and not notice it. And the compiler would not tell them, but instead would insert an empty element at that spot. I would prefer that the compiler require you to explicitly indicate each element in an array literal, for example:

var myList:Array = [1, 2, 3, undefined, 4, 5, 6];

Or, absent that, I would prefer that the documentation clearly spell out the behavior of extra commas in array literals.

It would be nice, but it's hardly essential. It's never going to be good practice to put in multiple commas and I can't ever remember have issues doing it accidentally.

Raise a bug.

------------------------------------------------------------------------
*From:* Paul A. <p...@ipauland.com>
*To:* flexcoders@yahoogroups.com
*Sent:* Thursday, April 11, 2013 3:00 PM
*Subject:* Re: [flexcoders] Array literals - odd behavior


Does it really matter? Nobody in their right mind is going to be populating arrays with multiple commas.










Reply via email to