Private class fields, oh boy.
The enterprise programmers are not finished colonizing that poor wayward lisp yet. :(
It’s kinda funny that they picked Perl/Ruby-esque sigil syntax for private fields inside basically-Java class syntax. Interesting mix.
at()? Why not just use the normal indexing with brackets?
Probably because negative indexes are already a thing. Semantically, arrays are just hash maps with a few utility methods. arr = “hello” sets the string key ”hello”, and for (let i in arr) iterates over array keys as strings. arr[-10] already refers to the hash map element with key ”-10”.
arr = “hello”
for (let i in arr)
I wish they would just fix the language instead of making these changes in a backwards-compatible way, and it doesn’t even need to be a breaking change if you add 'use strict 2021'; or something.
'use strict 2021';
Then they’ll have to admit the language is crazy and only exists because of coincidences.
After all the harsh words against less cool languages over the year that is too hard even after TypeScript have proven beyond all reasonable doubt that a typed JS-like language is not only technically possible but a massive productivity boost.
Now, don’t get me wrong: The JS community is cool and produces awesome software despite having to deal with a terrible no good language. In fact it makes it even more impressive.
But it is still like doing amazing artistry on a one-wheel-bike, propped up with gyro stabilizers like linters etc.
Amazing, but should have been totally unnecessary when ordinary bikes (e.g. Java) were already on the market.