My Reference Safety System (DIP???)

Zach the Mystic via Digitalmars-d digitalmars-d at
Sun Mar 1 16:43:49 PST 2015

On Monday, 2 March 2015 at 00:37:05 UTC, Zach the Mystic wrote:
> On Monday, 2 March 2015 at 00:06:52 UTC, deadalnix wrote:
>>> I thought of this, and I disagree. The very fact of assigning 
>>> to `T t` adds the reference count you need to keep `s.t` from 
>>> disintegrating. As soon as you borrow, you increment the 
>>> count.
>> I'm sure many inc/dec can still be removed.
> Do you agree or disagree with what I said? I can't tell.

I think I understand now. Yes, they can probably be optimized, 
but that's a different issue than whether you need to protect 
certain RC instances from the "tyranny" of a function call. My 
whole argument is that basically you don't. Only when you split 
pass directly in the call itself: "fun(x,x)", does this issue 
ever matter, and it's easy to deal with.

More information about the Digitalmars-d mailing list