On 7/17/2014 10:47 PM, H. S. Teoh via Digitalmars-d wrote:
Deferring the allocation point to the top level has the advantage of
letting high-level user code decide what the allocation strategy should
be, rather than percolating that decision down the call graph to every
low-level function.

Exactly.

Of course, it's not always possible to defer this, such as if you need
to tell a container which allocator to use. But IMO this should be
pushed up to higher-level code whenever possible.

Andrei's allocator scheme addresses this. It will also allow such decisions to be made at the high level.

Reply via email to