memory management and the standard library

Olivier FAURE couteaubleu at gmail.com
Mon Mar 18 10:18:41 UTC 2019


On Monday, 18 March 2019 at 10:07:37 UTC, Jacob Carlborg wrote:
> On 2019-03-17 12:27, Johannes Pfau wrote:
>> You can implement that using TLS globals, I think this is what
>> std.experimental.allocators theAllocator is supposed to do. Of 
>> course
>> you're limited in typing, you can't use templates there.
>
> Then the functions can't be pure.

Yeah, what you want is either an annotation to tell a function 
foobar "you're pure except for *these* global variables", and 
then a way to shim the globals when calling foobar from a pure 
function, or implicit arguments (which are basically the same 
thing).


More information about the Digitalmars-d mailing list