[Issue 12387] Mark stdlib malloc and friends as weekly pure
d-bugmail at puremagic.com
d-bugmail at puremagic.com
Thu Mar 20 06:42:39 PDT 2014
https://d.puremagic.com/issues/show_bug.cgi?id=12387
yebblies <yebblies at gmail.com> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |yebblies at gmail.com
--- Comment #3 from yebblies <yebblies at gmail.com> 2014-03-21 00:42:37 EST ---
> Or please try to explain why "malloc" isn't special. It will help me
> understand, and stop me from pressing on the issue.
I guess you could consider a malloc leak as an observable side effect... eg
duplicate calls to a pure function that calls malloc can't be removed even if
they return an immutable pointer.
> malloc and friends affect global state and therefore are not pure.
>
> The gc is special in that it is allowed to modify global state and yet remain
> pure. malloc is not special.
This is a convoluted way to say 'no' without giving any reasons...
--
Configure issuemail: https://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
More information about the Digitalmars-d-bugs
mailing list