Should GC.malloc be considered 'pure'?
KennyTM~
kennytm at gmail.com
Thu Jun 9 10:51:31 PDT 2011
Given that the 'new' expression can be used in 'pure', should it be that
GC allocation functions like GC.malloc, GC.qalloc and GC.extend (?) be
weakly pure also? And should it apply to other managed allocators as
well, e.g. the proposed TempAlloc?
I'm asking this as one of the specializations of std.conv.toImpl calls
GC.malloc, which is one of the 11 causes preventing std.conv.to from
being pure, and GC.qalloc and GC.extend (and memcpy and Array.capacity)
are used by std.array.appender (of pure range), and appender is also a
major reason why std.conv.to is not pure.
More information about the Digitalmars-d
mailing list