Sealed Containers + Ignore Interior

dsimcha dsimcha at yahoo.com
Thu Nov 4 11:24:09 PDT 2010


Now that D is starting to get serious about sealed containers, can we PLEASE,
pretty please, have my patch put into the GC to allow ignoring interior
pointers to data structures?  (See
http://d.puremagic.com/issues/show_bug.cgi?id=2927).  It would be highly
useful in the case where the container is sealed and the container designer
therefore knows that no reference's lifetime will exceed the head reference's
lifetime.  Furthermore, it's safer than the alternative way of dealing with
false pointers, which is to use manual memory management.

If the concern is that accepting this patch would be premature optimization
for the current GC, we could make it have soft semantics, i.e. fully precise
GC's would not have to honor it.  If the patch has succumbed to bit rot, I'd
be willing to redo it, since it didn't take me very long in the first place.


More information about the Digitalmars-d mailing list