Maybe D is right about GC after all !

Joakim dlang at joakim.fea.st
Fri Dec 22 17:21:12 UTC 2017


On Friday, 22 December 2017 at 16:17:33 UTC, Dan Partelly wrote:
> On Friday, 22 December 2017 at 15:23:51 UTC, Russel Winder 
> wrote:
>> I think we are now in a world where Rust is the zero cost 
>> abstraction language to replace C and C++, except for those 
>> who are determined to stay with C++ and evolve it.
>
> Why should we settle for this ? D code (efortless) is easier to 
> read then Rust. I assume this to be true for a lot of 
> programmers who know C/C++. It also introperates very well with 
> C, which is great boon, since at low level we live on the 
> shoulder of a titan written in C.  It has tremnedous features, 
> and ironically the best of them could have been designed to not 
> relay on GC. As most , if not all, of the features offered by 
> its library could have been done with no GC.
>
>>
>> D, like Go, should glory in having a GC and just go with it.
>>
>> Of course this does not mean the GC as is is good enough. Go 
>> is on its
>> third I believe, and Java on it's fifth.
>
> A good implementation at library level of GC would mean that I 
> can use one single language
> in all areas of system programming. Or at least, a 
> implementation where std:: and core features of language should 
> not relay on GC. This, IMO is an advantage not to be neglected. 
> A better C mode with a very powerfull high level standard 
> library (like std:: ), exceptions, RAII, classes (yes, why not 
> ) typeid would be a very big step ahead. All those could be 
> done without having to worry about existence of GC. C++ has all 
> those.
>
> IMO the key here is the standard libray of the language. 
> Nothing in it should relay  on the existence of GC. Why, why, 
> does it have to depend on GC and hence automatically disqualify 
> itself from a better C world ? The C runtime ezposed by core is 
> powerfull, but imagine having std:: power in better C as well. 
> I really lament this.
>
> You could have the best of the two worlds.

You seem not to have read the original link and Walter's first 
post: why would we expend all that effort on a small, shrinking 
niche of the language market that is populated by a couple 
thousand diehard programmers who won't look at any new language?

That's not to say the core team is ignoring that market, as the 
betterC mode is geared toward some of them who don't need all the 
features you want, but realistically it will take years for D to 
provide all D features with an easy choice of GC or not, if it's 
even technically feasible.  Given that GC is already here and 
addresses a much bigger market, there's no point in Osborning all 
that's available _today_ by forever dreaming for a fully no-GC 
stdlib that's not going to be here anytime soon.

If that's what you really want though, I suggest you pitch in, as 
Mike Franklin has being doing recently:

https://github.com/dlang/dmd/pulls/JinShil


More information about the Digitalmars-d mailing list