On 1/17/12 11:09 AM, Michel Fortin wrote:
On 2012-01-17 06:48:26 +0000, Andrei Alexandrescu
<[email protected]> said:

I hate I must ask this:

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

or

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

Is it a verb? If not, it is a property.

But why "by"? Why not just "aa.keys"? It's much more natural. Is "byKey"
going to consume the associative array like "byLine" does for files?
Obviously no. So I don't see why you need "by" here.

"Iterate collection by key".

aa.keys is taken btw.


Andrei


Reply via email to