D Language Foundation Monthly Meeting Summary

sighoya sighoya at gmail.com
Fri Jun 4 19:56:06 UTC 2021


On Friday, 4 June 2021 at 19:31:57 UTC, IGotD- wrote:
>Because of this Phobos must take the lowest common denominator 
>approach (malloc/free) in order to be able to accommodate all 
>the different needs.

This uniformization sounds too good to be true. I think most 
people think that, but it's simply not true. malloc/free is 
incompatible to garbage collection.
You can parametrize over all possible MM strategies making every 
function generic and pass the right MM into it.
Beside increasing template bloat it isn't that optimal as the 
same code has different performance characteristic for each MM, 
so you need to overload over all these and even then you won't 
cover all the MM because there are people wanting to insert their 
custom MM, but the library was already written.

I'm asking myself, even if we don't care about the cons, would 
that at all be possible with a ~20 years old language with a ~20 
years of ecosystem evolution. How many things need to be 
rewritten?




More information about the Digitalmars-d-announce mailing list