Idea #1 on integrating RC with GC

Adam Wilson flyboynw at gmail.com
Tue Feb 4 20:35:40 PST 2014


On Tue, 04 Feb 2014 20:21:17 -0800, Andrei Alexandrescu  
<SeeWebsiteForEmail at erdani.org> wrote:

> On 2/4/14, 5:06 PM, Adam Wilson wrote:
>> Ok, disregard my previous post. I think I understand better what Andrei
>> is driving at, but it's not obvious, better examples are needed. But
>> more to the point this is going to make us all equally miserable. The
>> ARC guys don't get the compiler support needed to make ARC fast.
>
> Of course they could. Compiler can have internal support for RC slices.  
> Object will need some built-in support anyway.
>
>> It
>> completely ignores cyclic-refs inside the slice.
>
> Wrong. It leaves cyclic references to the GC.
>

Ok, I can see that.

>> It doesn't solve the
>> primary ARC-camp complaint about the reliance on the GC.
>
> Why not?
>

It still has to be loaded and running. It can still non-deterministically  
pause. Yes, the pause may happen less often but they will take a similar  
amount of time to run the mark phase as the current, which is  
statistically the longest phase.

I already know that they are going to complain loudly because this does  
nothing to resolve their central complaint. Also Adam Ruppe brought up an  
interesting problem that I didn't understand with slicing in this  
configuration. If he could comment that would be appreciated.

>> The GC now guys
>> have more hoops to jump-through when working with Phobos.
>
> Why?
>

New details to corral: Don't forget to add your .toGC() calls now kids!

>> And it
>> increases complexity and cognitive load all around.
>
> That comes with the territory. Have no illusion we can add RC support in  
> any way at no cost.
>

Yes, but why do it in such a way as to penalize existing practices. The  
penalty properly belongs on the new practices.

>
> Andrei
>


-- 
Adam Wilson
GitHub/IRC: LightBender
Aurora Project Coordinator


More information about the Digitalmars-d mailing list