Plan for D

sighoya sighoya at gmail.com
Sun May 16 21:40:03 UTC 2021


On Sunday, 16 May 2021 at 20:33:12 UTC, dogman wrote:
> On Sunday, 16 May 2021 at 19:46:06 UTC, Imperatorn wrote:
>> On Sunday, 16 May 2021 at 18:24:11 UTC, dogman wrote:
>>> [...]
>>
>> There are "GC off" switches.
>>
>> @nogc, GC.disable and betterC
>
> But then we dont know if all standard library and other modules 
> can be used. We dont even have associate arrays etc. What we 
> want is a pluggable framework where people can use the default 
> GC or their GC

Definitely + for this, providing a set of GCs for different 
situations is a good thing as severally proven in Java.

> or manual memory management by registering malloc/free's(like 
> zig). Code is same. I am not sure technically if its possible 
> as I am not an expert in compiler.

I think that's what @russhy also wanted to propose. Providing 
support for other memory containers/allocators in stdlib.
As much as I like it, I think "the same" code for all kinds of MM 
is just too beautiful to become true.
Different memory containers will work better for different code 
or even require code to be rewritten which is often the case with 
the ownership system in Rust.
Then we are left to overload over any MM container increasing the 
risk for a state space explosion.


More information about the Digitalmars-d mailing list