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.

--
Michel Fortin
[email protected]
http://michelf.com/

Reply via email to