andyferris 14 hours ago

45% slower to run everywhere from a single binary... with less security holes, without undefined behavior, and trivial to completely sandbox.

Its definitely a good deal!

  • pron 14 hours ago

    > without undefined behavior

    Undefined behaviour is defined with respect to the source language, not the execution engine. It means that the language specification does not assign meaning to certain source programs. Machine code (generally) doesn't have undefined behaviour, while a C program could, regardless of what it runs on.

  • ben-schaaf 14 hours ago

    Native code generally doesn't have undefined behaviour. C has undefined behaviour and that's a problem regardless of whether you're compiling to native or wasm.

gishh 14 hours ago

That which is old is new again. The wheel keeps turning…

“Wait we can use Java to run anywhere? It’s slow but that’s ok! Let’s ride!”

  • bloppe 13 hours ago

    There's a reason Java applets got deprecated in every browser. The runtime was inherently insecure. It just doesn't work for the web.

    Also, targeting the JVM forces you to accept garbage collection, class-based OO and lots of pointer chasing. It's not a good target for most languages.

    Java's pretty good, but wasm is actually a game changer.

    • hashmash 11 hours ago

      The Java runtime isn't any more inherently insecure than the JavaScript runtime, and JavaScript seems to work just fine for the web.

      The key reason why applet security failed was because it gave you the entire JDK by default, and so every method in the JDK needed to have explicit security checking code in place to restrict access. The model was backwards -- full control by default with selective disabling meant that every new feature in the JDK is a new vulnerability.

    • gishh 13 hours ago

      I am a huge, huge fan of wasm. The first time I was able to compile a qt app to Linux, windows, Mac, and wasm targets, I was so tickled pick it was embarrassing. Felt like I was truly standing on the shoulders of giants and really appreciated the entirety of the whole “stack” if you will.

      Running code in a browser isn’t novel. It’s very circular. I actually met someone the other day that thought JavaScript was a subset of Java. Same person was also fluent in php.

      Wasm is really neat, I really love it. My cynical take on it is that, at the end of the day, it’ll just somehow help ad revenue to find another margin.

      • bloppe 12 hours ago

        Fair. Running in the browser isn't novel, but JS/TS are some of the most popular languages in history and that almost certainly never would have happened without monopolizing the browser.

        Expanding margins are fine by me. Anticompetitive markets are not. My hope is that wasm helps to break a couple strangleholds over platforms (cough cough iOS cough Android)