4 ms·
Wasm has no facility for GC, polymorphic inline cache, or direct DOM integration. They are on the roadmap, but probably far off. So there isn't a direct path
by tyingq 10y ago
Wasm has no facility for GC, polymorphic inline cache, or direct DOM integration. They are on the roadmap, but probably far off.
So there isn't a direct path to WASM for many dynamically typed languages. Tcl can get by without all that because it's small enough to just port the whole C interpreter instead of trying to have tcl compile down to wasm. That would be very large, slow, and tricky for Perl, Python, etc.
- kodablah 10y agoGC is not as far off as you might think. A markdown overview has been merged and there is a PR for impl in the interpreter. See PRs at https://github.com/WebAssembly/gc https://github.com/WebAssembly/gc
- deleted 10y ago[deleted]
- vvanders 10y ago> Wasm has no facility for GC It shouldn't, GC is a level above Wasm and would complicate languages that don't use it. > or direct DOM integration You mean like this: https://github.com/tcr/rust-webplatform https://github.com/tcr/rust-webplatform ? The problem with most dynamic langauges you listed is they do things that the web doesn't allow or do them in ways that aren't friendly to a browser.
- tyingq 10y agoOn GC, maybe you should let them know. They seem to be headed down that path: https://github.com/WebAssembly/design/blob/master/GC.md https://github.com/WebAssembly/design/blob/master/GC.md Oh, and on direct DOM access. You presented a link to an implementation of indirect DOM access. They have an open issue you might find interesting: https://github.com/tcr/rust-webplatform/issues/20 https://github.com/tcr/rust-webplatform/issues/20
- traverseda 10y agoAssembly language also doesn't have GC or polymorphic inline cache. I imagine that direct DOM integration would end up just being some kind of shared memory thing. I don't get this kind of complaint. It seems to completely miss the point that webassembly is a compile target, like arm or x86.
- tyingq 10y agoIt is not a complaint. It is in their plans. They describe it sometimes in VM terms, versus ASM terms. Without those things, languages like Perl or Python aren't practical, because you would have to download the whole interpeter runtime. That's not a complaint, it is an observation.
- traverseda 10y agoWell sure, but a runtime isn't going to change all that much. It's exactly the kind of thing that caches well. I mean a re-usable garbage collector sounds alright, but I don't think it will be used that much. I mean, I presume that you could implement a garbage collector as a shared library, but nobody actually does that.
- tyingq 10y agoYou have to come at it from the perspective of people that want languages like Perl or Python to run well in WASM. They are thinking of it being used the same way that javascript is today. If WASM has some of the features of a virtual machine (meaning the JVM type, not the hypervisor type), and direct DOM access, that would be possible. Downloading all of the runtime would put them at a disadvantage. Those things are on the WASM roadmap. So this isn't just me going off on a tangent. https://github.com/WebAssembly/design/blob/master/GC.md https://github.com/WebAssembly/design/blob/master/GC.md