[Info-vax] The (now lost) future of Alpha.
Arne Vajhøj
arne at vajhoej.dk
Tue Aug 7 19:32:16 EDT 2018
On 8/7/2018 12:16 PM, 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.
>
> Perhaps, but that's nit picking,
No.
It is a major difference between C++ and languages
like Java and C#.
> as it generally is used if
> you have dynamic object creation and deletion.
No.
C++ use RAII.
In theory you can add GC to C++ and a few academic reserach
projects has done so.
I have never heard about a C++ project actually using it.
And it is not a standard C++ feature.
> 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...
Maybe you should read it.
If it is the same as in the special edition then it is a half page.
And it is very clear: "The standard does not require that an
implementation supply a garbage collector".
And Bjarne does not want it added to the language. See:
http://www.modernescpp.com/index.php/garbage-collectio-no-thanks
http://www.stroustrup.com/bs_faq.html#garbage-collection
Arne
More information about the Info-vax
mailing list