3 ms·
If all you want is a sane subset of JS, then all you need is a JS linter. The whole point of the language was more compact syntax. Shortening lambdas is one o
by cben 13y ago
If all you want is a sane subset of JS, then all you need is a JS linter. The whole point of the language was more compact syntax.
Shortening lambdas is one of the most important changes because it makes heavy callback/DSL code viable. Exhibit: http://coffeekup.org/ http://coffeekup.org/.
Now renaming JS's `for (name in obj)` to `for name, val of obj` and redefining `in` to `for x in array` is indeed confusing (coming from other languages I can see how it's better than JS ideosyncratic use of `in` but still confusing...)