On Wed, Oct 12, 2011 at 2:08 PM, Brendan Eich <[email protected]> wrote:
> On Oct 7, 2011, at 6:51 AM, Mikeal Rogers 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. > > > Andreas Rossberg brought it up. We can put it on the agenda for the > November meeting, but it could be better to discuss here first, if people > have specific migration stories involving let and var (say, from Firefox > add-on or browser JS). > I tried |let| briefly in Firebug, then backed it out. I don't recall exactly why, but I do recall thinking I had been mislead. Maybe there are some styles of JS where var vs let is a big deal, but not for me. (I am a fan of varsWithLongNames). I don't think var caused me a problem more than a couple of times. Thus to me it seems like a big deal about nothing. Rather than a funky rule ("at top level..."), "using stricter" makes more sense. That way pressure to change comes from other devs telling you best practice rather than compiler error messages you can't figure out. jjb
_______________________________________________ es-discuss mailing list [email protected] https://mail.mozilla.org/listinfo/es-discuss

