Is there even a point to having byKey/byValue?
Once UFCS comes in (and there's already a seemingly working pull request for it), having .keys return a range like byKey/byValue should will be a silent (though more efficient) change for most programs. And in the situations where it's not (namely when you want to store it as an array), just adding a .array at the end would work.

On 17/01/2012 12:48 AM, Andrei Alexandrescu wrote:
I hate I must ask this:

int[string] aa;
foreach (k; aa.byKey) { ... }

or

int[string] aa;
foreach (k; aa.byKey()) { ... }



Thanks,

Andrei "I told you" Alexandrescu

Reply via email to