Why I Like D

H. S. Teoh hsteoh at quickfur.ath.cx
Wed Jan 12 18:23:45 UTC 2022


On Wed, Jan 12, 2022 at 05:42:46PM +0000, bachmeier via Digitalmars-d-announce wrote:
> On Wednesday, 12 January 2022 at 16:52:02 UTC, Arjan wrote:
[...]
> > I think it stems from experience from long ago when JAVA was HOT and
> > sold as the solution of all world problems, but failed to meet
> > expectations and was dismissed because they found is was the GC what
> > made it fail..

That was my perception of GC too, colored by the bad experiences of Java
from the 90's.  Ironically, Java's GC has since improved to be one of
the top world-class GC implementations, yet the opinions of those who
turned away from Java in the 90's have not caught up with today's
reality.


[...]
> I don't think they're necessarily wrong. If you don't want to deal
> with GC pauses, it may well be easier to use an approach that doesn't
> have them, in spite of what you have to give up. On the other hand,
> many of them have no idea what they're talking about. Like claims that
> a GC gets in your way if the language has one.

Depends on the language; some may indeed require GC use to write
anything meaningful at all, and some may have the GC running in the
background.  However, D's GC only ever triggers on allocations, and as
of a few releases ago, it doesn't even initialize itself until the first
allocation, meaning that it doesn't even use up *any* resources if you
don't actually use it (except for increasing executable size, if you
want to nitpick on that).  This must be one of the most non-intrusive GC
implementations I've ever seen.  Which makes me *really* incredulous
when the naysayers complain about it.


T

-- 
There are two ways to write error-free programs; only the third one works.


More information about the Digitalmars-d-announce mailing list