On Saturday, 12 January 2013 at 10:58:23 UTC, thedeemon wrote:
So the runtime is aware of weak pointers and clears them to "empty" state when pointed value dies. I don't see yet how it can be implemented in D without patching its GC.

There's that, but also what about what if the pointer wasn't a pointer to the data at all? What it if was a part of a float that determined a calculation for your taxes? Or a series of flags that happen to make that magic number? If they get 'nulled' by the GC, I'd call that a definite bug and problem; Unless the GC can tell apart what is and isn't a pointer to data.

Reply via email to