Garbage Collection for Systems Programmers

Walter Bright newshound2 at digitalmars.com
Tue Apr 9 16:41:57 UTC 2024


On 4/8/2024 5:47 PM, Richard (Rikki) Andrew Cattermole wrote:
>> Consider the performance deficit from write-barriers.
> 
> D is in an excellent position to make write barriers opt-in, with different 
> strategies allowing for different GC designs.

It would be a massive bifurcation of the language. It affects everything. 
Languages that use this tend to have a lot of low-level C systems code, because 
those languages are not systems implementation languages. Trying to mix code 
that does and does not do write gates will be very tedious and error prone in 
hard-to-detect ways.

The net advantage tilts towards write barriers when the language does pretty 
much all its allocation with the GC. D is not like that.

Rust is a contender, does not use GC, and does not use write barriers. I know 
that D's @live has elicited minimal interest, but it does provide an opportunity 
to say that D is a memory safe language.



More information about the Digitalmars-d mailing list