Didn't say it was essential. Just that I would prefer it. As you said, "nobody in their right mind" would do it. One of the hallmarks of a well-designed language, IMO, is that it doesn't silently allow you to do things that no one in their right mind would do. At least a compiler warning would be nice. I couldn't begin to estimate how much time this compiler warning has saved me:
Warning: Assignment within conditional. Did you mean == instead of =? Do I make that mistake frequently? Not really. But if I make it in 1 out of 500 if statements, given the amount of code I crank out on a daily basis, it's going to happen now and then, and the time the compiler warning saves me is significant. ________________________________ From: Paul A. <p...@ipauland.com> To: flexcoders@yahoogroups.com Sent: Thursday, April 11, 2013 3:52 PM Subject: Re: [flexcoders] Array literals - odd behavior 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. > > >> > > > > >