Tasks, actors and garbage collection

Paulo Pinto pjmlp at progtools.org
Wed Apr 21 09:23:06 UTC 2021


On Wednesday, 21 April 2021 at 08:09:17 UTC, Ola Fosheim Grøstad 
wrote:
> On Wednesday, 21 April 2021 at 06:37:21 UTC, Paulo Pinto wrote:
>> On Tuesday, 20 April 2021 at 16:45:38 UTC, russhy wrote:
>>> C++ could have went with a GC, they decided to go against and 
>>> encourage the use of smart pointers
>>>
>>> That was smart, actually
>>
>> Kind of, there are C++/CLI, C++/CX, C++ Builder and what many 
>> keep forgeting when talking about game developers and tracing 
>> GC, Unreal C++.
>
> Yes, but C++ has had the Boehm collector since the early 90s, 
> which is comparable to D's current default collector. There is 
> also C++11 N2670 ("Garbage Collection and Reachability-Based 
> Leak Detection") that has no compiler support, but actually is 
> in the language.
>
> Garbage collection simply isn't widespread in C++ as the main 
> allocation strategy, but it is in D. The demographics are 
> different.

None of the examples I gave use the pre-historic Boehm collector.

Also no one cares about C++11 N2670, because the above mentioned 
examples already had their own solutions, and aren't going to 
rewrite them, because it was a compromise not capable to do what 
those dialects were already offering, so much that C++11 N2670 is 
voted for removal in ISO C++23.


More information about the Digitalmars-d mailing list