Input Range addition to associative arrays

monarch_dodra monarchdodra at gmail.com
Thu Dec 6 13:15:38 PST 2012


On Thursday, 6 December 2012 at 21:10:37 UTC, Andrei Alexandrescu 
wrote:
> On 12/6/12 3:51 PM, monarch_dodra wrote:
>> On Thursday, 6 December 2012 at 20:43:06 UTC, Andrei 
>> Alexandrescu wrote:
>>> On 12/6/12 2:03 PM, Phil Lavoie wrote:
>>>> Hi,
>>>>
>>>> I am aware that you can iterate over associative arrays in 
>>>> multiple ways
>>>> using the structure's opApply and different delegates 
>>>> returned by
>>>> properties. I think adding a "range" property returning an 
>>>> input range
>>>> to the associative array would benefit the users of the D 
>>>> language.
>>> [snip]
>>>> What are your thoughts?
>>>
>>> I also think we should add a forward range interface to AAs.
>>>
>>> Andrei
>>
>> input -> forward
>>
>> ...
>>
>> Why stop there when you can have bidirectional?
>
> We wouldn't want to impose too much on the implementation (e.g. 
> doubly- instead of singly-linked lists for collision handling).
>
> Andrei

Oh yeah... Good point.


More information about the Digitalmars-d mailing list