GC.malloc is pure - wat

Adam D. Ruppe via Digitalmars-d digitalmars-d at puremagic.com
Fri Apr 24 08:14:03 PDT 2015


string toLower(string s);

Should that be pure? Repeated calls to it, given the same input, 
will return the same output, but they will also most likely be 
separately allocated.

GC.malloc might be cheating to be pure, but it does enable a lot 
of more logically pure stuff on top of it...


More information about the Digitalmars-d mailing list