On Monday, 21 September 2015 at 10:18:17 UTC, Ola Fosheim Grøstad
On Monday, 21 September 2015 at 09:58:31 UTC, Chris wrote:
I sometimes wonder - and please forgive me my ignorance,
because I'm not a GC expert at all - if it would be possible
to create a system where the created objects know their own
life spans and destroy themselves, once they are no longer
used. Like the cells in our bodies.
Yes, this is the system Rust uses, but the compiler has to
prove the life spans at compile time. So how convenient that
is, is limited to the capabilities of the prover and for how
long you want to wait for the computation of the life times.
So I'm not completely nuts! Good to know. :) I wonder, if
something like this is feasible in D.