4 ms·
do you have an opinion on which direction is more likely? naively I'd say 2 would be better since it'd require less language-specific toolchain work for a bette
by omeze 4y ago
do you have an opinion on which direction is more likely? naively I'd say 2 would be better since it'd require less language-specific toolchain work for a better devexp for the end developer.
- josephg 4y agoOption 1 - Webassembly without a built-in garbage collector - exists today. You can compile Go or C# to WASM today, and it will output a WASM module with an embedded garbage collector. There's a draft proposal to add a built in garbage collector (option 2) to WASM. I have no idea what the current status is - maybe someone involved can chime in. I suspect some version of the WASM GC spec will land eventually. When it does, languages like Go, C# and Java should start to become competitive with javascript as frontend web languages. https://github.com/WebAssembly/gc https://github.com/WebAssembly/gc
- aidenn0 4y agoHow does it find the GC roots on the stack?
- flohofwoe 4y agoAFAIK garbage collected 'objects' are completely separate from regular WASM heap allocations and tracked directly by the WASM VM (I may be wrong though, but details are here: https://github.com/WebAssembly/gc/blob/main/proposals/gc/Overview.md https://github.com/WebAssembly/gc/blob/main/proposals/gc/Ove...)
- aidenn0 4y agoI meant in e.g. the C# runtime...
- brabel 4y agoWASM GC is already in the implementation phase[1], which means, IIUC that it's a matter of time for it to make into the official standard (i.e. the spec itself is mostly done now)... the implementations are behind a feature flag in Chromium[2] and Firefox seems to be far into making it available, see the current list of WASM-related issues they're working on[3]: [1] https://github.com/WebAssembly/proposals https://github.com/WebAssembly/proposals [2] https://chromestatus.com/feature/6062715726462976 https://chromestatus.com/feature/6062715726462976 [3] https://bugzilla.mozilla.org/buglist.cgi?product=Core&component=JavaScript%3A%20WebAssembly&bug_status=__open__ https://bugzilla.mozilla.org/buglist.cgi?product=Core&compon...
- deleted 4y ago[deleted]