I know there are JS haters here on HN, but (as an old OS/compiler guy from the '70's and '80's), it's truly marvelous to see what you can do with dynamic languages by pouring hundreds man-years into optimized language implementations like V8.

So much energy is spent making a shitty language perform better. It is really sad.

Would you rather have that "shitty language" waste your time because it performs poorly?

I think there are only historical reason to only having bad languages in browsers. Having good languages in WASM proves it.

EDIT - Good from a performance perspective, things like static typing and symbolically executable and pre-compiled.

What "good" languages does WASM enable?

All those other dynamic scripting languages? They're DOA because nobody's going to download the entire VM every time.

What about all those nice functional languages? Very problematic because the toolchain relies on LLVM-like semantics which don't like good garbage collectors or functional programming in general.

We then get down to C-like languages, Rust, and more esoteric languages (and promptly discard the esoteric ones for lack of a decent ecosystem).

Who in their right mind wants to write a front-end in C++ or Rust? By the time you get anything done, the web has changed and you're stuck with a pile of dated code that takes too much time and costs too much money to update.

The web had a shot at a decent language with Dart (it was/is even an ECMA standard). It didn't die because of other browsers. It died because of poor web dev adoption rates.

If only Eich had been allowed to implement scheme then none of this would have been an issue.

There are already ongoing efforts to port JVM and .NET environments into WASM, although currently it is more of a proof of concept.

When WASM gets mature, expect the return of the plugins, maybe even a Flash to WASM compiler.

I don't believe the answer to JS is downloading, and compiling the entire JVM.

As I mentioned, It is already happening.

https://github.com/SteveSanderson/Blazor

https://github.com/kg/ilwasm

https://github.com/konsoletyper/teavm

In two to three years time, Flash will be back.