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

           Summary: Make the GC functions weakly pure
           Product: D
           Version: D2
          Platform: Other
        OS/Version: All
            Status: NEW
          Severity: enhancement
          Priority: P4
         Component: druntime
        AssignedTo: nob...@puremagic.com
        ReportedBy: kenn...@gmail.com
            Blocks: 4850


--- Comment #0 from kenn...@gmail.com 2011-06-12 13:09:53 PDT ---
Original discussion:
*
http://www.digitalmars.com/d/archives/digitalmars/D/Should_GC.malloc_be_considered_pure_137919.html
*
http://www.digitalmars.com/d/archives/digitalmars/D/Re_Should_GC.malloc_be_considered_pure_137984.html
*
http://www.digitalmars.com/d/archives/digitalmars/D/Re_Should_GC.malloc_be_considered_pure_138177.html

Due to practicality, allocation is allowed in pure function. By the same token,
GC.malloc should also be 'pure'. GC functions being not weakly-pure is the
reason why std.conv.to (bug 4850) and std.array.appender cannot be pure.

Marking the GC functions are pure are easy, but the problem is the implication
behind it. Technically, GC functions depend on global states, so they cannot be
weakly pure. But then std.array.appender can never become pure without
sacrificing performance.

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

Reply via email to