4 ms·
This is the weird thing about the GC proposal: it's not really adding a GC to WASM, as it is more adding an opaque object reference system similar to Java or si
by Jasper_ 4y ago
This is the weird thing about the GC proposal: it's not really adding a GC to WASM, as it is more adding an opaque object reference system similar to Java or similar, independent from linear memory (the goal of Mark Miller was to run without any linear memories at all). C and C++ and their compilers are based on the concept of a linear, addressable memory and adding in opaqueness really is like pulling teeth.
I can't see much success for the GC proposal, tbh. It's really fighting a very strong current.
- azakai 4y agoThe goal of Wasm GC is to allow GC-using languages to be ported to wasm. They already can today, of course, but this will make them more efficient in some cases, with smaller downloads and faster execution. This might be a very big deal - most code written today is written in GC languages! - and that is separate from the story for C/C++/Rust/Zig and other linear-memory languages. Concretely, the wasm community already has GC ports in progress for Java, Dart, and Kotlin, and there is a lot of promise shown there.
- kevingadd 4y agoThe GC proposal is going to get used by things like Java/C# compilers and runtimes, nobody writing C/C++ has a good reason to use it, unfortunately. Unless you really want the JS runtime's garbage collector up in your business. Cross-language collection for DOM objects, maybe?
- Jasper_ 4y agoIt's still the recommended way to use DOM objects from C/C++, right? interface-types/host-bindings was stopped so I don't see any other solution than anyref-ing your way to hell (or JS wrappers). Are we going to bring hat pointers back?
- udbhavs 4y agoWait is interface types no longer happening or did I misunderstand your comment?