We could have gone with a better JS replacement adopted by all players -- with ints, typing (or gradual typing), more optimisable, better memory management options (e.g. buffers, "value objects", etc)...
With the current speed of replacement of evergreen browsers it would take 2-3 years and we could start using it (some immediately if they only targeted specific newer browser versions e.g. for their enterprise apps).
Instead we got exactly what you describe + piling on stuff on top of JS.
And we'd still be stuck with a "one-size-fits-all" mentality for the browser. The desktop and server environments have amply demonstrated that different languages have different strengths, and it's a good thing in my mind that we can have solutions tailored for different sorts of problems and applications.
>The desktop and server environments have amply demonstrated that different languages have different strengths
I believe that the main thing demonstrated in practice is that everybody [1] just likes one or another Algol derived language, from a small set of languages with superficial differences between them.
Java, C#, Golang and their dynamic cousins, Python, Ruby, Javascript which have suddenly all adopted a longing for static types (Typescript and flow, Python type annotations, etc) and for async execution (asyncio, channels in Golang, async/await in C#, etc), and all piling functional features. It's like they are converging.
Sure, they still have semantic and syntactic differences, but in the end, not that important in the grand scheme of things. I think that not catering to any superficial preference of all programmers can eliminate endless bikeshedding and be hugely beneficial -- it worked wonders for JS both in terms of industry involvement (excellent JITs and tooling from 4 huge vendors), and in terms of traction/community/libs.
What's sad is not that we don't have 20+ languages for the web, but that the one we have was a quick kludge for a totally different use, and not that great for what it's now used.
[1] the casual expression meaning "most people", not the universal quantifier meaning "all with absolute no exceptions".
With the current speed of replacement of evergreen browsers it would take 2-3 years and we could start using it (some immediately if they only targeted specific newer browser versions e.g. for their enterprise apps).
Instead we got exactly what you describe + piling on stuff on top of JS.