Simplest way to create an array from an associative array which its contains keys and values?
H. S. Teoh
hsteoh at quickfur.ath.cx
Fri Jan 3 17:43:37 PST 2014
On Sat, Jan 04, 2014 at 12:39:32AM +0000, bearophile wrote:
> Ali Çehreli:
>
> >I still like that solution. :) Even if it's not spelled out to be
> >correct in the spec, I can't imagine a hash table implementation
> >where byKey and byValue don't iterate in lock step.
>
> But in the long term ignoring what's present or missing in the specs
> is a bad idea.
>
>
> >I wrote the following Expander range as an exercise.
>
> See also:
> https://d.puremagic.com/issues/show_bug.cgi?id=5489
> https://d.puremagic.com/issues/show_bug.cgi?id=7957
[...]
I did an implementation of aa.byPair once, that iterates over keys and
values simultaneously, but it was ultimately rejected:
https://github.com/D-Programming-Language/druntime/pull/574
T
--
What's a "hot crossed bun"? An angry rabbit.
More information about the Digitalmars-d-learn
mailing list