Why is D unpopular?

Ola Fosheim Grøstad ola.fosheim.grostad at gmail.com
Mon Nov 8 14:55:46 UTC 2021


On Monday, 8 November 2021 at 14:45:19 UTC, Rumbu wrote:
> Yes, but it can be a deterministic gc like reference counting. 
> Pascal (modern one) did it from the beginning 20 years ago with 
> strings, dynamic arrays and interfaces and nobody from the 
> "every cpu cycle counts" camp complained about it. Interfaces 
> in pascal resolved also the class/struct pointer dichotomy: use 
> a class if you want to manage memory yourself, use an interface 
> implemented by that class if you want that we take care of the 
> deallocation.
>
> I wonder if the !gc crowd will be happy with ARC built in 
> language.

I would. You could have ARC for objects that are shared between 
actors/threads and use a proper GC with an actor/thread. Then you 
get the best of both worlds IMO.

What is preventing ARC from happening right now is that the 
interface between the compiler frontend and backend isn't clear. 
So it is very costly for an individual to implement it.

With a better compiler architecture then ARC is something a 
separate group of 2-3 people could add as it requires limited 
insight into the compiler internals, and you can start by adding 
regular reference counting and gradually improve on the ARC 
optimizations.




More information about the Digitalmars-d mailing list