www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.bugs - [Issue 6151] New: Make the GC functions weakly pure

reply d-bugmail puremagic.com writes:
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: nobody puremagic.com
        ReportedBy: kennytm gmail.com
            Blocks: 4850



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: -------
Jun 12 2011
parent d-bugmail puremagic.com writes:
http://d.puremagic.com/issues/show_bug.cgi?id=6151


Alex Rønne Petersen <alex lycus.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |alex lycus.org



CEST ---
What we really need in order to move forward with this is a way to explicitly
tell the compiler that something is weakly pure.

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