for-of statement of sparse array

Rick Waldron waldron.rick at gmail.com
Thu Jul 5 18:30:44 PDT 2012



On Thursday, July 5, 2012 at 9:18 PM, Brendan Eich wrote:

> Brendan Eich wrote:
> > This upholes the Array forEach (and all other extras) hole-skipping. 
> > The deck is stacked against for(;;) iteration in my view.
> > 
> 
> 
> LOL, "This upholds", of course.
> 
I had hoped this was a clever pun :)


Currently, devs expect for-loop and while (assuming common patterns in play here) to be "the expected" way that sparse array holes are exposed -- so from the "give me what I most likely expect" perspective, I agree with the consistency wins argument: for-of should act like for-in 

Rick
> 
> /be
> _______________________________________________
> es-discuss mailing list
> es-discuss at mozilla.org
> https://mail.mozilla.org/listinfo/es-discuss
> 
> 


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.mozilla.org/pipermail/es-discuss/attachments/20120705/ae4ff48f/attachment.html>


More information about the es-discuss mailing list