DIP69 - Implement scope for escape proof references
deadalnix via Digitalmars-d
digitalmars-d at puremagic.com
Mon Dec 15 05:32:49 PST 2014
On Saturday, 13 December 2014 at 20:45:53 UTC, Walter Bright
wrote:
> On 12/13/2014 2:10 AM, bearophile wrote:
>> Walter Bright:
>>
>>>>> struct Tree {
>>>>> RefCount!(Tree*) left;
>>>>> RefCount!(Tree*) right;
>>>>> ...
>>>>> }
>>>>
>>>> ... I don't think I'd ever have a use for this code.
>>>
>>> You have no use for tree structures?
>>
>> Giving a reference counter to every pointer in a binary tree
>> sounds a bit too much.
>
> DMD, for example, uses ASTs where the nodes have multiple
> parents.
It is a DAG then.
More information about the Digitalmars-d
mailing list