DIP77 - Fix unsafe RC pass by 'ref'

deadalnix via Digitalmars-d digitalmars-d at puremagic.com
Thu Apr 9 23:02:34 PDT 2015


On Friday, 10 April 2015 at 05:56:40 UTC, Ola Fosheim Grøstad 
wrote:
> On Thursday, 9 April 2015 at 21:47:47 UTC, Walter Bright wrote:
>> On 4/9/2015 12:58 PM, "Ola Fosheim =?UTF-8?B?R3LDuHN0YWQi?=
>>> indirections...? Is the compiler going to do a recursive scan 
>>> and create
>>> temporaries of all RC-pointers that are reachable?
>>>
>>> (e.g. RCArrays of RCArrays)
>>
>>
>> It examines the types of all mutable values available to the 
>> function.
>
> So if I pass in a graph, linked list or a tree, then it will 
> scan the entire structure at runtime and build a large set of 
> temporaries before calling the function?

No, but indeed, passing down indirection require boxing too. The 
DIP is not clear about it.


More information about the Digitalmars-d mailing list