Future of memory management in D
Paulo Pinto
pjmlp at progtools.org
Wed Nov 17 12:35:03 UTC 2021
On Wednesday, 17 November 2021 at 10:59:19 UTC, IGotD- wrote:
> On Wednesday, 17 November 2021 at 02:10:02 UTC, jmh530 wrote:
>>
>> I'm confused by this because it seems as if the managed C++
>> iterations from Microsoft do not have much traction. What is
>> the benefit of different types for GC/non-GC pointers?
>
> Managed C++ is now named C++/CLI and it is probably still there
> if you want to use it. Not many use C++/CLI and I suspect that
> people simply use C# instead as it is a much better alternative
> for most cases.
It is mostly used to consume those COM APIs that Windows team
keeps doing only for C++ consumption and are harder to get
straight with plain P/Invoke, or RCW/CCW.
>
> The benefit of a special type for managed pointers is that you
> can change the implementation of the GC fairly easily as well
> as incorporate metadata under the hood. Tracing GC is not
> suitable for low latency programs/embedded, but reference
> counting can be a viable alternative for the low latency
> programs.
PTC and Aicas are in business for the last 25 years doing real
time GC for embedded.
It is a matter of who's on the team,
"Hard Realtime Garbage Collection in Modern Object Oriented
Programming Languages."
https://www.amazon.com/Realtime-Collection-Oriented-Programming-Languages/dp/3831138931/
Basically the foundation background for the Aicas product, the
thesis written by one of the founders,
"Distributed, Embedded and Real-time Java Systems"
https://link.springer.com/book/10.1007/978-1-4419-8158-5
Given that D is still in the philosophical search of it wants to
double down on GC or not, such optimizations aren't possible.
More information about the Digitalmars-d
mailing list