Revamping associative arrays

Andrei Alexandrescu SeeWebsiteForEmail at erdani.org
Sun Oct 18 13:00:09 PDT 2009


bearophile wrote:
> Andrei Alexandrescu:
> 
>> I'm not sure whether much or any of this is attainable within D2.<
> 
> The things I've written about aren't all equally important and they
> don't require the same amount of work to be implemented. I am sorry
> for writing that gazpacho. There are two things that I think are more
> important that can implemented now: the opEquals among AAs, and the
> default iteration with foreach on the keys. The other things can
> wait. The opEquals among AAs requires probably less than 20 lines of
> code.

You may want to submit those to bugzilla so they don't get forgotten.

> Two persons (plus Walter, of course) have said they don't like to
> iterate on the keys first. The other people have kept muzzle shut so
> I can't tell yet.

Well clearly sometimes both are needed. I think it would be limiting to 
e.g. only offer iteration on keys, to then do one extra lookup to fetch 
the value.


Andrei



More information about the Digitalmars-d mailing list