News for hackers. Stuff that matters.
Re:ES6: The features I'm most excited about by alkonaut on Monday July 06, 2015 @06:31AM (#9838051)
I feel like in a new design you would pick one or the other, as a second scoping rule would not carry its own weight in terms of what problems it solves vs the complexity of implementing runtimes or learning the language. In that case I'm almost certain you would go for block only as it is the default in nearly all curly braced languages.
Re:ES6: The features I'm most excited about by techiferous on Monday July 06, 2015 @11:20AM (#9839700)
Yes, as a matter of style you could just use let everywhere, and know that var is there for legacy compatibility reasons.
Re:ES6: The features I'm most excited about by untog on Monday July 06, 2015 @12:19PM (#9840206)
I think they have selected one over the other - let. var exists for compatibility, but there is zero reason to use it in new code.