Maybe D is right about GC after all !

Dan Partelly i at i.com
Thu Jan 4 08:09:27 UTC 2018


On Wednesday, 3 January 2018 at 22:28:15 UTC, Jonathan M Davis 
wrote:


>
> So, if no one speaks up about how it's actually great to have a 
> GC, it starts seeming like we all think that D shouldn't have a 
> GC, which isn't the case at all.
>
> - Jonathan M Davis

Having GC is awesome, it's like driving a luxury car with all the 
comfort and safety on highways.  But also there is need for raw 
powerful cars which  can be driven off-roads, accepting the 
risks, to haul metal and lumber to civilization, to build 
infrastructure.

Now my perception is that D tries hard to be both, with some 
regrettable consequences. Started as a GC language with language 
features which depend on GC, and a std which was done for a GC 
language and has dependency on GC. But it also envied
the cars which can be driven off roads, so it allowed GC to be 
disabled. At the cost of being unable to use parts of the 
language, and whole parts of std. Then it got even more envious 
and got a -betterC mode whose raison d'etre is unclear, apart 
from some people saying it's Walter's toy, which crippled D even 
more, and made std a dubious proposition until someone goes 
through it step by step and see the traps.
This could have been solved in 2 ways imo (hindsight )

1. Commit to GC , implement state of the art collector and be 
happy ever after
2. Go 0 abstraction route. Keep core language independent of GC 
and have std not depending on it. Then add GC support with the 
ability to completely disable it with a compiler switch from 
runtime.





More information about the Digitalmars-d mailing list