Recursive discriminated unions [Phobos2]

Chris Nicholson-Sauls ibisbasenji at gmail.com
Sun Feb 15 19:53:21 PST 2009


Andrei Alexandrescu wrote:
> Chris Nicholson-Sauls wrote:
>> On the other hand, the new form This[] works fine, so far.  The only 
>> missing feature is an opApply().
> 
> Ok, I filed a bug report on your behalf.

Thanks...  I somehow always forget we have that available.

>> The form This[This]... Using 'foo.get!(table_t)[k] = v;' results in a 
>> range violation.  For the moment, they are essentially immutable 
>> hashes.  Could actually be fine for a number of purposes.
> 
> That's because foo.get returns by value. Try using peek, which returns a 
> pointer. Could you please post some code if that doesn't work for your 
> case?

Will try that tomorrow after work.

>> ----------
>>
>> If I get some extra free time this weekend (assuming V-day isn't the 
>> death of me) I'll hack away at it some and see if I can't figure some 
>> things out, on all counts above.
>>
>> Oh, and THANKS.  :)
> 
> Advantage #1 of marrying a foreigner: you get to convince her that V-day 
> is an artificial event created for commercial interests only because 
> they want to sell blood diamonds. Watching "Blood Diamond" together a 
> week before V-day recommended.
> 
> 
> Andrei

Thanks for the advice, I'll try it next year.  ;)

-- Chris Nicholson-Sauls



More information about the Digitalmars-d mailing list