42 ms·
I like webassembly mostly because it doesn’t have garbage collection. I know the article wasn’t calling for anything like this, but Please keep wasm GC free.
by 0x20cowboy 5y ago
I like webassembly mostly because it doesn’t have garbage collection.
I know the article wasn’t calling for anything like this, but Please keep wasm GC free. Golang, for example, compiles in its own GC (which is why it’s wasm is so large).
You always have to be careful of memory issues when mixing languages - see using Lua or mixing C and Go.
I’d rather deal with memory leaks than fighting garbage collection. If you want GC, maybe just stay in Javascript?
- sfvisser 5y agoDon't think your comment makes a lot of sense in the context of the article. Author explicitly wants to create/use/drop some WASM instances in the JavaScript world without leaking memory. Piggybacking on the existing JS GC is perfectly reasonable approach here.
- 0x20cowboy 5y agoWell, I said my comment wasn't super related to the article. I suppose my somewhat hidden comment was that if one wants GC you should build it into the wasm side like golang does. I don't think creating something in one system, and trying to memory manage it in another system is good idea in the first place - at least not something you should do on a real system. I think playing around with stuff is fun, and I didn't want to come across negative because while I think it's a bad idea, I love playing with bad ideas.
- k__ 5y agoAs far as I understood the WASM people, they will allow the use of the host GC, so in the future you don't have to bring one yourself.