On Oct 7, 2011, at 6:51 AM, Mikeal Rogers <[email protected]> wrote:

> 
> 
> On Thu, Oct 6, 2011 at 5:08 AM, Brendan Eich <[email protected]> wrote:
> On Oct 4, 2011, at 10:52 AM, Mikeal Rogers wrote:
> 
> > But, some of them simply double the semantics and syntax in the language 
> > without a path to deprecate previous syntax. I'm a big fan of let, but if 
> > you don't deprecate var we're going to have to contend with new programmers 
> > keeping two sets of scoping rules in their head.
> 
> You mean by deprecate what, exactly?
> 
> Web JS is full of var. Making any attempt to migrate a big hunk of it to ES6 
> require replacing all 'var' with 'let' is a huge tax, since scoping works 
> differently.
> 
> Ok, how about saying if you use 'let' in a function or at top level, you can 
> no longer use 'var'? That's less of a tax on average, but for a long program 
> or single function, it's as bad.
> 
> This is exactly what I was getting at.

Clearly this could just be solved with tooling. The first time your editor sees 
the let keyword in a file, an animated image of Douglas Crockford's head would 
appear with the message, "It looks like you're trying to use block scope."

Sorry, I couldn't resist.

- Russ
_______________________________________________
es-discuss mailing list
[email protected]
https://mail.mozilla.org/listinfo/es-discuss

Reply via email to