A betterC base

H. S. Teoh hsteoh at quickfur.ath.cx
Thu Feb 8 19:28:52 UTC 2018


On Thu, Feb 08, 2018 at 12:17:06PM -0700, Jonathan M Davis via Digitalmars-d wrote:
> On Thursday, February 08, 2018 14:54:19 Adam D. Ruppe via Digitalmars-d 
> wrote:
[...]
> > Garbage collection has proved to be a smashing success in the
> > industry, providing productivity and memory-safety to programmers of
> > all skill levels. D's GC implementation follows in the footsteps of
> > industry giants without compromising expert's ability to tweak even
> > further.
> >
> >
> >
> > That's what we should be saying every single time someone mentions
> > GC. Including it was the RIGHT DECISION and we should own that.
> 
> +10000000000000000000
[...]

/// ditto. :-P

While I agree that we *should* make D as usable as possible for those
who don't want to use the GC, all too often that belies the benefits
that having a GC actually brings.  It's true that the current GC could
be improved, and that we could reduce GC-dependence in Phobos, provide
better @nogc support, etc.. But we should not apologize for *having* a
GC, as if it was somehow a wrong decision.

I think it's *great* to have a GC.  It has saved me *so* much time,
energy, and frustration that would have been spent obsessing over memory
management every other line of code I write; now I can instead direct
that energy towards actually solving stuff in the problem domain that is
the entire purpose of the code in the first place.  And for those times
when performance is an issue, GC.disable and GC.collect have proven
sufficient to clear the bottleneck in 95% of the cases. And besides, D
doesn't stop you from dropping back to malloc/free if you really need
to. Or, for that matter, RefCounted.


T

-- 
If you want to solve a problem, you need to address its root cause, not just its symptoms. Otherwise it's like treating cancer with Tylenol...


More information about the Digitalmars-d mailing list