Tasks, actors and garbage collection

sighoya sighoya at gmail.com
Tue Apr 27 15:23:30 UTC 2021


On Tuesday, 27 April 2021 at 13:50:09 UTC, SealabJaster wrote:
> On Tuesday, 27 April 2021 at 13:29:43 UTC, evilrat wrote:
>> So what's the problem with you?
>
> Just commenting here as an observation, I think one of his main 
> points is that there's a lack of a standard library based 
> around allocators rather than the GC.

Without to be invited too much in the details here, I think you 
are right. But how should a stdlib look like which abstract over 
all allocators, would it be safe can it be safe and performant 
and generalizing?

I mean RC, for instance, is inferior in what it can accept for a 
language/what it can manage safely compared to GC.

So in return, some algorithms may only work for a GC.

Sure, we can write other algorithms for other allocators and 
other manual memory strategies, but then we are arriving to the 
state space explosion- and incompatibility problem.

I think it is hard to unify the world of different MM containers, 
as severally evidenced by C++.
Though I would kind of like to be convinced if I'm wrong.


Why not go the nim direction and detect acycles with static 
analysis. I know that this is cumbersome given some steps in the 
evolution of D at least from what I heard so far.
Generally, I would like to see the compiler improving storing a 
huge amount of metadata in the resulting binary, e.g., is the 
argument of a function borrowed or cached somewhere without the 
interception of the user in the frontend.

And generally, people moaning about the GC's non-determinism may 
prefer to track cycle detection for potential resources just in 
time with some negative runtime performance hit for the benefit 
of just in time deallocation.



More information about the Digitalmars-d mailing list