[Info-vax] The (now lost) future of Alpha.
already5chosen at yahoo.com
already5chosen at yahoo.com
Tue Aug 7 15:36:36 EDT 2018
On Tuesday, August 7, 2018 at 7:16:27 PM UTC+3, Chris wrote:
> On 08/07/18 02:02, Arne Vajhøj wrote:
> > On 8/6/2018 6:09 PM, Chris wrote:
> >> On 08/06/18 00:49, Arne Vajhøj wrote:
> >>> Compared to languages that use GC then C++ is pretty good in this
> >>> regard.
> >>
> >> Perhaps not as c++ does include the dynamic creation of objects and
> >> subsequent garbage collection as a core part of the language.
> >
> > No.
> >
> > GC is not part of the C++ language.
> >
> > Arne
>
> Perhaps, but that's nit picking, as it generally is used if
> you have dynamic object creation and deletion.
>
Boehm garbage collector for C++ exists. But it's rarely used in real life.
> You either write code for and manage your own memory, or let the
> system do it for you. There's a whole section on GC etc in the
> second edition of Stroustrup, 1991...
>
> Chris
Yes, unfortunately.
There is small paragraph near the end full of incoherent rumbling.
The 3rd Edition is much better in that regard. It has 3 reasonably wriitten paragraphs. It explains how GC and destructors poorly interact with each other
and gives recommendations (essentially "Don't use non-trivial destructors" to
users that still think that GC in C++ is good idea.
But 3rd Edition is rather old, too. Since the large part of C++ user's community fall in love with RAII design pattern, so for them Bjarne's suggestions would probably sound as heresy.
Now, the funny thing is that Stroustrup *invented* RAII.
More information about the Info-vax
mailing list