3 ms·
One of the big issues for a WebAssembly-First programming language becoming big is that Rust is already has a very good WebAssembly story, being a direct compil
by RcouF1uZ4gsC 6y ago
One of the big issues for a WebAssembly-First programming language becoming big is that Rust is already has a very good WebAssembly story, being a direct compiler supported target.
In addition, WebAssembly was designed to be able to run languages like C and C++ (and Rust) efficiently, and so does not have built in garbage collection.
Thus a language that wants to be WebAssembly first, is either going to have to bring in a garbage collector, have safety with something very similar to Rust's borrow checker (in that case, it would be similar complexity to Rust), or else put the burden on the programmer for safety like C and C++ (in that case, what is the advantage over them).
- deleted 6y ago[deleted]
- pjmlp 6y agoMy x86_64 and ARM CPUs were also designed to able to run languages like C and C++ (and Rust) efficiently, and so does not have built in garbage collection.
- Yoric 6y agoAnd Rust runs very well on them :)
- bayesian_horse 6y agoThe burden of entry to learn Rust seems higher than with Grain. And Rust does not have webassembly-centric language features. C/C++ contains a lot of baggage from other platforms. And has a steeper learning curve. Interoperability with WASM and Javascript is even worse.
- jedisct1 6y agoZig supports WebAssembly out of the box, doesn't require GC and has first-class support for WASI.
- v8dev123 6y agoRust doesn't have first class WASM support. It lacks many things Emscripten provides to C++. I'd say C++ has first class support for WASM. Very straightforward to get start!!
- azakai 6y agoWasm 1.0 did not include garbage collection, but there is a lot of effort right now by many people to add it (that is what I work on myself currently). Once wasm has GC, languages like Grain will be able to save a lot on code size, and have some advantages over the "first set" of wasm languages (C/C++/Rust/Zig/etc., all using linear memory), like smaller sizes, less memory fragmentation, and properly collecting cycles with JS.