Idea #1 on integrating RC with GC
Andrei Alexandrescu
SeeWebsiteForEmail at erdani.org
Tue Feb 4 23:21:43 PST 2014
On 2/4/14, 11:20 PM, Jesse Phillips wrote:
> On Tuesday, 4 February 2014 at 23:51:35 UTC, Andrei Alexandrescu wrote:
>> and those who don't care say:
>>
>> auto x = fun().toGC();
>
> If I don't care, why would I place .toGC() at the end of my calls?
This is the way it all works: RC+GC is more structure than GC, so you
start with more structure and then optionally "forget" it.
> What
> reason do I have to go out of my way to request this?
You use an API that uses e.g. string, not RCString.
> What problems can
> I expect when I forget to add it?
Passing x around won't compile.
Andrei
More information about the Digitalmars-d
mailing list