[Issue 5057] New: std.variant.Algebraic-aware GC

d-bugmail at puremagic.com d-bugmail at puremagic.com
Fri Oct 15 05:08:55 PDT 2010


http://d.puremagic.com/issues/show_bug.cgi?id=5057

           Summary: std.variant.Algebraic-aware GC
           Product: D
           Version: D2
          Platform: All
        OS/Version: All
            Status: NEW
          Severity: enhancement
          Priority: P2
         Component: druntime
        AssignedTo: sean at invisibleduck.org
        ReportedBy: bearophile_hugs at eml.cc


--- Comment #0 from bearophile_hugs at eml.cc 2010-10-15 05:08:20 PDT ---
D has unions, and sometimes normal C-style unions are useful. But in many
situations when you have a union you also keep a tag that represents the type.
So in many of those situations you may use the tagged union of Phobos,
std.variant.Algebraic.

If std.variant.Algebraic implementation is good enough (currently it's
unfinished and not good enough yet) and its usage becomes a common D idiom when
a simple tagged union is necessary, then the D GC may be aware of it, and it
may read and use the tag of the Algebraic to know at runtime what the type is.
This may improves the GC precision a little.

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------


More information about the Digitalmars-d-bugs mailing list