Richard Cornford Richard at litotes.demon.co.uk
Wed Aug 20 18:09:43 PDT 2008

Michael Haufe wrote:

> Is it worth changing the name of a statement/expression/definition
> who's labeled intuitiveness is debatable and  which  has been in
> use since JavaScript 1.7? If compatibility is one of the goals
> wouldn't this create more trouble than its worth?

Compatibility with JavaScript 1.7 is not nearly as important as 
compatibility with ES 3. It is not really a "will it break the web" 
question because while those features are syntax errors in IE they will 
not tend to be used on the web.

Still, there would be no reason for a JavaScript(tm) implementation of a 
future ES not providing both "local" and "let" with "let" being a syntax 
extension (as it is now in ES 3 terms), and giving them both identical 
meaning (and "let" can be deprecated so it may be removed at some future 
date). Thus providing compatibility with exiting JavaScript 1.7 specific 

One question would be; if "local" is used to declare variables (with some 
specific scope) doesn't it then become a reserved word? And then, if an ES 
3 script has used "local" as an Identifier doesn't it then find that 
Identifier causing a syntax error in a some future ES implementation? The 
alternative is interpreting "local" based on its context in the source 
code, but that has got to be harder than only seeing it as having one 

While "let" is the type of word that does not lend itself to being used as 
a variable name, "local" may have been used to name something that 
embodied that concept.

I am quite happy with "let", but that is mostly because it is good enough 
for its job and short, where short is very appealing given the number of 
times I can expect to be typing it in the future.

Richard Cornford. 

More information about the Es-discuss mailing list