Simplest way to create an array from an associative array which its contains keys and values?

Ali Çehreli acehreli at yahoo.com
Fri Jan 3 16:49:03 PST 2014


On 01/03/2014 04:39 PM, 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 don't mean to ignore. I would like to see the spec changed. This feels 
similar to first C++ standard never explicitly requiring that the 
elements of a string be contiguous in memory but every implementation 
doing so.

>> 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
>
> Bye,
> bearophile

They make sense to me.

Ali



More information about the Digitalmars-d-learn mailing list