I don't think the intention is to add a general purpose GC to WASM because GC implementations vary significantly based on language characteristics. I believe they intend to introduce GC primitives from which a GC can be implemented.
An Elm specific GC would actually be pretty simple as I understand it, thanks to all the assumptions that can be made with a pure, functional, eagerly evaluated language.
Some years ago I wrote a PostScript interpreter and quite a while it worked very well without a garbage collector - all was done with reference counting. Apple shows with ARC (Automatic Reference Counting) that even a language much more complex than ELM can work without GC.
So as long as you don't have cyclic references reference counting should do the trick.
Ahh, you're right. I didn't read the proposal properly. That's actually better though =)
We're a place where coders share, stay up-to-date and grow their careers.
We strive for transparency and don't collect excess data.