On Tuesday, 24 September 2013 at 15:57:00 UTC, Andrei Alexandrescu wrote:
Also, I hope we'll be able to allow allocators to define Pointer(T), Ref(T) etc. that supplant replacements for the built-in notions of pointer, reference etc. Then, user code that uses these notions instead of the built-in ones will be guaranteed some nice properties (e.g. automatic reference counting). Unfortunately I don't see a way for an allocator to enforce that its users don't do illegal things such as escaping addresses etc. So it would be a discipline-backed scheme. Notable beneficiaries will be containers.


It will be fun without tail const.

The global GC does offer manual deallocation. It's the presence of collect() that indicates tracing abilities. If deallocateAll() is present, user code must assume it will be called during destruction.


It doesn't make any sens at this level. These allocator do not know what a pointer is. And can't be @safe if they do know.

Reply via email to