GC.malloc is pure - wat

weaselcat via Digitalmars-d digitalmars-d at puremagic.com
Fri Apr 24 17:30:27 PDT 2015


On Friday, 24 April 2015 at 23:27:36 UTC, Steven Schveighoffer 
wrote:
> All I'm saying is that GC.malloc alters global state. I agree 
> that it's OK to pretend that it doesn't because as long as you 
> agree not to base things on this knowledge, you are fine 
> calling pure functions that use GC.

A lie that is universally agreed upon is virtually 
indistinguishable from the truth.

the reasons against making malloc/free pure are very... thin.

Walter himself attempted to make them pure only last week(!)
https://github.com/D-Programming-Language/druntime/pull/1221


More information about the Digitalmars-d mailing list