Civility

Walter Bright newshound2 at digitalmars.com
Fri Jun 24 21:52:09 UTC 2022


On 6/24/2022 12:57 PM, rikki cattermole wrote:
> At some point its going to have to be implemented as opt-in if we want to allow 
> people to experiment with them.

Since D does not distinguish between gc and non-gc pointers, it would be a heavy 
penalty.

Consider the following:

     struct S { ... }

     class C { int a; S s; }

In Java, an instance of C would require two different allocated objects. This is 
a heavy burden on the GC, and justifies the write gates. Even if D allocations 
were all on the GC, D just does not have such a heavy reliance on the GC, and so 
write gates are much less justifiable.

It's also kinda off-topic for this thread. I don't really want to debate gc or 
non-gc here, just pointing out how positive framing can be while still being 
totally honest.


More information about the Digitalmars-d mailing list