ES6 doesn't need opt-in

Gavin Barraclough barraclough at apple.com
Tue Jan 3 12:28:58 PST 2012


On Jan 3, 2012, at 12:18 PM, Brendan Eich wrote:

> Maybe. We tried in 2006-2007 and ran into at least this:
> 
> https://bugzilla.mozilla.org/show_bug.cgi?id=351515
> 
> where 'yield' was used as a parameter name. I dimly recall 'let' in the wild but may be misremembering. Perhaps out of paranoia we made both 'let' and 'yield' require version opt-in.
> 
> The site that used 'yield' has since been updated to avoid using 'yield'. So we could try again to reserve 'let' unconditionally. Heaven knows I've been yapping about 'let' as the new 'var' long enough to warn most developers away from it!
> 
> I discussed this on IRC briefly with Oliver, who seemed game. The only issue I see is that nightly builds (WebKit, Chrome, Firefox) don't get enough use to do other than find true positives. It would be good to find such 'let' usage in the wild, of course, but finding nothing won't give us a green light, just lack of a red light.

Why unconditionally reserve let? - would it not make more sense to handle this in a contextual fashion if we can do so? – if so, we could introduce 'let' without any backwards compatibility risk, and retain the option to promote it to a keyword at a later date.

G.

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.mozilla.org/pipermail/es-discuss/attachments/20120103/01eb0f93/attachment-0001.html>


More information about the es-discuss mailing list