GC.malloc is pure - wat

David Nadlinger via Digitalmars-d digitalmars-d at puremagic.com
Fri Apr 24 11:03:49 PDT 2015


On Friday, 24 April 2015 at 15:05:15 UTC, anonymous wrote:
>     auto v = f(x);
>     auto w = f(x);
> When f is pure, a compiler should be free to reuse the value of 
> v for w. That's no good with GC.malloc, obviously.

In case there is further confusion about purity in D, let me do a 
shameless plug for an article I wrote a couple of years back: 
http://klickverbot.at/blog/2012/05/purity-in-d/

  — David


More information about the Digitalmars-d mailing list