new should lower to a template function call

jmh530 john.michael.hall at gmail.com
Fri Jul 24 14:08:49 UTC 2020


On Friday, 24 July 2020 at 03:29:14 UTC, Andrei Alexandrescu 
wrote:
> [snip]
>
> Allocators need a champion. Ideally a good integration with the 
> GC would be achieved but I'm not a GC expert and don't have the 
> time to dedicate to it.
>
> As far as I know there's little use of allocators, which is 
> unlike C++ where there's a lot of excitement around them in 
> spite of a much scarcer API. I recall there's a little use of 
> allocators (copied to code.dlang.org and improved) in Mir. Not 
> much else I've heard of.
>
> I was hoping there'd be a lot of experimentation accumulating 
> with new allocators by now, for example to this day I have no 
> idea whether FreeTree is any good. (It never rebalances, but I 
> thought I'd wait until someone says the trees get lopsided... 
> still waiting).

I know mir has makeSlice and makeNdSlice that use 
std.experimental.allocator.

I can't speak to why people don't use them in D, but it is hard 
to compare to C++ where it is already part of the standard 
library.


More information about the Digitalmars-d mailing list