Hacker News new | past | comments | ask | show | jobs | submit login

Because a lot of us really hate JavaScript. I see JavaScript as being somewhat like racism. It used to be really bad and it's gotten a little better. And those who are happy with the status quo (JS devs) keep saying stuff along the lines of, "it's better now...I thought we were past this." They're continually told, "no, from our perspective it's a fundamentally-broken language and we won't be happy until we can write anything front-end without a single line of JavaScript." And yet because they're happy with the way things are, they have problems really hearing that message and understanding just how unacceptable the current situation is for others.



> I see JavaScript as being somewhat like racism

That's a really dumb thing to say.

Btw, WebAssembly has nothing to do with choice, but with performance, its primary purpose being to let C/C++ to run in the browser. And was preceded by Asm.js.

This is actually very relevant. Going with WebAssembly means you're going low level — e.g. a language author will no longer have the JavaScript runtime to piggyback on, no garbage collector for example. Which might be good news for a language like Haskell, because people now have the opportunity to run the actual GHC runtime and garbage collector in the browser. But you have to port it all and the binary size downloaded by users will have to include everything.

So language implementations like Scala.js or PureScript aren't rushing to WebAssembly yet. In the future anything is possible of course, but currently it's not a useful compilation target for garbage collected languages.

Therefore I don't have good news — if diversity is what you're looking for, then know that WebAssembly was built for C/C++ and Rust and languages not fitting this narrow profile are out.


First, Rust is a far superior language to JavaScript, so even if it were a 1-for-1 swap, we'd still be coming out ahead. But you've forgotten a huge example of a language that fits into your "narrow profile." Swift is also an LLVM language and people are already writing front-end code in Swift for Apple platforms. Being able to share front-end code across web and iOS/macOS platforms will be a huge win. There hasn't been much movement towards compiling Swift to WebAssembly yet, but there's nothing that should make that much more difficult than Rust.

But the list of LLVM-capable languages is much longer than that. So even if it does force an initial download of a GC, that's still more choice than we have now. And you seem to still be assuming that the JavaScript runtime is a good thing. Lots of us feel otherwise. It's a huge source of bugs and vulnerabilities and the sooner we can ship browsers that no longer rely on it, the better it will be for everyone. WebAssembly will eventually get the equivalent of shared libraries so GCs can be downloaded once from a CDN and cached for future use.

WebAssembly is the first web platform development that promises a future that doesn't rely on JavaScript in any capacity. It's obviously not there yet and initial forays into it will be primarily about performance until crucial web APIs like DOM manipulation are enabled for the platform. But the future of WebAssembly really is about choice and not just performance. Don't confuse the current state with the end state.


> "a language author will no longer have the JavaScript runtime to piggyback on"

WASM has been designed to run in the same VMs that run JavaScript.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: