Andrei Alexandrescu:

I do agree tagged unions should be pushed into the language; they'd help the GC.

A more general solution is to add a onGC() optional method that gets called by the GC on collections, and tells it what's inside the union.

Bye,
bearophile

Reply via email to