0 votes
in D Programming by
Can't Garbage Collection Be Done In C++ With An Add-on Library?

1 Answer

0 votes
by
Yes, I use one myself. It isn't part of the language, though, and requires some subverting of the language to make it work. Using gc with C++ isn't for the standard or casual C++ programmer. Building it into the language, like in D, makes it practical for everyday programming chores.

GC isn't that hard to implement, either, unless you're building one of the more advanced ones. But a more advanced one is like building a better optimizer - the language still works 100% correctly even with a simple, basic one. The programming community is better served by multiple implementations competing on quality of code generated rather than by which corners of the spec are implemented at all.

Related questions

+1 vote
asked Mar 5, 2021 in D Programming by SakshiSharma
0 votes
asked Mar 5, 2021 in D Programming by SakshiSharma
...