back

by masswerk·11y ago·view on hn ↗
I'm especially concerned about the loss of "var".

The web (as in HTML + JS) has always been about backward "interpretability" (meaning, a new feature won't break existing clients). The incompatibility of "var" and "strong mode" seems to be the most important break in this concept since JavaScript 1.1 and the introduction of the Array-constructor. (Some may remember the days, when we had to write two scripts, one for Netscape 2 and newer, and another one for older clients, each defining the same functions and producing comparable results. – Most of this was owed to features related to DOM-interaction. – Alas, the language-attribute ...)

Realistically, not everyone will have a fully updated (or even fairly current) browser, and this really shouldn't be an issue which necessarily breaks things. "strong mode" will thus limit access to only those clients with at least some support of ES6 (as in "let").

Please add some basic support of "var"!

2 comments
And while we're at it, why not add a backward compatible type declaration, like a string "use type a: int, s: string;" immediately following any declaration or declaration list?
They are not removing var from the language - they are removing it from the "sane mode" only. If you don't write "use sane mode", you can still use var AFAIK.