DIP69 - Implement scope for escape proof references

Walter Bright via Digitalmars-d digitalmars-d at puremagic.com
Sat Dec 13 12:45:53 PST 2014


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.


More information about the Digitalmars-d mailing list