On Thursday, 15 May 2014 at 00:00:37 UTC, Walter Bright wrote:
On 5/14/2014 3:42 PM, Brian Schott wrote:
If malloc can never be considered pure, even when hidden behind an allocator,

It cannot be pure as long as it can fail.

why can it be considered pure when hidden behind the GC?

Because GC failures are not recoverable, so the pure allocation cannot fail.

Malloc is a tricky case. The results it returns are theoretically always unique, and it is referentially transparent if we pretend that we have infinite memory.

Reply via email to