But I do think one day (might take a while) JS will no longer be the obvious choice for front-end browser development.
But I do think one day (might take a while) JS will no longer be the obvious choice for front-end browser development.
IMO: Rust isn't the easiest language to learn, but the investment pays off handsomely and the ecosystem is just wonderful.
EDIT: I meant "to learn" which completely changes the statement :)
I think that day might be sooner than anyone thinks- Chromium is dominant enough now that their including Dart as a first-class language (or more likely, a successor to Dart) will likely be a viable strategy soon.
Of course, the wildcard is Apple, but ultimately Dart can compile down to JS- being able to write in a far superior language that natively runs on 80% of the market and transpiles to the rest is suddenly much more of a winning proposition.
I like trying new languages and have played with dozens, and JS and Prolog are the only languages that have made me actually scream.
You should definitely try to branch out. At the very least it gives you new ways of thinking about things.
Go or dart is probably the best for "JS killer" in terms of maturity, tooling, and targeting the front end, followed by haxe, swift and/or rust (they may be better even, but frankly I'm not as familiar with them).
Nowadays it feels like the opposite, the committee takes so long to dot the i's and cross the t's that features take multiple years to make it through the approval process be ready to use (I'm looking at you, optional chaining).
bools (Boolean)
floats (Number)
ints (x|0 for i31 and BigInt)
arrays (Array, and 11-ish variants of TypedArray)
linked lists (Array)
sets (Set and WeakSet)
maps (Map and WeakMap)
structs (Object)
genSym (Symbol)
functions (Function)
strings (String)
What are they missing that you are dying to have?It has the advantage that it is possible to give a reasonable type to most functions without a rewrite (even if the types would be terribly long to accommodate the weak underlying type system)
In addition to the existing doubles, ES2020 added support for signed integers.