Would you pay for GC?
rikki cattermole
rikki at cattermole.co.nz
Wed Jan 26 00:03:26 UTC 2022
After reading my book on GC, you're kinda right.
Right now a generational GC wouldn't be possible in D due to not having
write barriers.
However this is not a language limitation and can be freely added to the
compiler implementation as an opt-in solution. The GC interface of
course is also freely modifiable and would too need to be modified.
Right now there is only two sort of wins I can see being possible.
1) Make the current conservative GC support snapshotting for concurrency
on Windows.
2) Support a task/fiber aware GC. This will kinda give us a generational
GC, without actually being a generational GC.
Either way, still no reason to think we need to change the language to
make more advanced GC's possible.
Just to be clear, that book clearly states that a generational GC is not
always the best solution. It is not worth complicating the language by
adding a whole new pointer type just to make this possible even if it
was required (which it absolutely isn't).
More information about the Digitalmars-d
mailing list