3 ms·
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
by curun1r 9y ago
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.