Social media

H. S. Teoh hsteoh at quickfur.ath.cx
Sat Jun 13 14:54:41 UTC 2020


On Sat, Jun 13, 2020 at 01:11:20PM +0000, Adam D. Ruppe via Digitalmars-d wrote:
> On Saturday, 13 June 2020 at 13:00:35 UTC, JN wrote:
> > There is always someone saying that you don't have to use GC in D
> 
> Yeah, this is true and for special cases we can show users how it is
> done, but I wish we'd just focus on actually selling GC instead of
> hiding from it.
> 
> GC is a proven winner in real world industry programming and is one of
> D's strengths. Why we constantly shoot ourselves in the foot by
> conceding this ground to internet trolls is beyond me.

+100!  For many applications, having a GC is not detrimental in any way,
and in fact as you said, GC brings many benefits, like, for example,
freeing up the programmers' energy to focus on the problem domain
instead of incessantly thinking about memory management issues.  And
frees up API design space to focus on the problem domain instead of
being cluttered with endless nitty-gritties of memory management.
There's a lot to be said for lean and clean APIs that maximize
composability, as opposed to APIs where memory management paraphrenalia
clutters every other corner.

Rather than shying away from GC, we shold be promoting it. @nogc is
really for special niches, that really shouldn't be a huge concern for
"normal" code.  (But good luck saying this to the C/C++ knee-jerk
anti-GC crowd.)


T

-- 
Chance favours the prepared mind. -- Louis Pasteur


More information about the Digitalmars-d mailing list