Nov 18 notes

Brendan Eich brendan at mozilla.com
Sun Nov 21 19:41:55 PST 2010


On Nov 21, 2010, at 7:21 PM, Chris Sells wrote:

> I'm a huge fan of iterators. As far as index goes, I'm not a fan of the use of the colon. We should take our time, but something that I wanted to throw into the pot would be to build on the key-based nature of for-in with syntax like this:
> 
> forvals ( var x in xs ) {...}

Resist bikeshedding early and all that, but there's already a strike against this or anything like it:

JS lacks run-together keywords apart from typeof and instanceof, which do not abbreviate as "vals" does.

In grasping for ":" instead of "in", the committee was trying to keep the introductory keyword "for". I think we had agreement that sticking with "for" is still worth using as a syntax design guide or "back up and try another route forward [than 'in']" design point.

/be


More information about the es-discuss mailing list