On Wed, 14 May 2014 17:00:39 -0700 Walter Bright via Digitalmars-d <digitalmars-d@puremagic.com> 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. Then we should create a wrapper for malloc which throws a MemoryError when malloc fails. Then malloc failures would be the same as GC failures. - Jonathan M Davis