memory management and the standard library

Sjoerd Nijboer dlang at sjoerdnijboer.com
Tue Mar 12 21:12:49 UTC 2019


So I pop in every now and then to look how D is progressing, and 
the last time I concidered D was for a problem a friend of me had 
with a small game. In that game there was some colission 
detection that required a custom datastructure and then some 
operations on top of that, with a hard limit on time.

For this I concidered using D for all its metaprogramming, but I 
couldn't find how people use manual memory management for common 
types in the standard library. Is there no way to use custom 
memory management for types as strings, arrays, every function in 
the std.algorith module and slices? Am I missing something 
obvious?

What's the view of the creators of D with regards to custom 
(manual or gc) memory management for the standard library? C++ 
Makes a template of about everything that could allocate just so 
it can extract the allocator. (std::vector for instance) Will D 
do that too? Will D use a different approach or conclude that 
this problem only exists for a select few and not the main 
audience of D?


More information about the Digitalmars-d mailing list