GC.malloc is pure - wat

anonymous via Digitalmars-d digitalmars-d at puremagic.com
Fri Apr 24 08:43:15 PDT 2015


On Friday, 24 April 2015 at 15:21:43 UTC, Steven Schveighoffer 
wrote:
> This is OK as long as f is *strong* pure. D pure is not the 
> same as the traditional definition.
>
> And GC.malloc is not strong pure, as it returns mutable data.

Ah, this is the piece I was missing. I was aware of weak/strong 
pure, but I didn't know the return type plays a role in that.

Could core.stdc.stdlib.malloc and friends also be marked pure 
then?


More information about the Digitalmars-d mailing list