On Wednesday, 29 October 2014 at 06:59:09 UTC, bearophile wrote:
This is very false. I have tons of cases where you only iterate on values or keys. On the other hand I have suggested several times that I'd like a byPairs (that yields keys-values tuple pairs).


It happens to me too but it's very much a minority of uses. Having sets as well as maps would help replace some of these cases. Not all, of course.


Doing byKey requires you to do a
lookup to get the corresponding value which just takes up cycles
unnecessarily.

Usually people use a "AA.byKey.zip(AA.byValue)" that is not reliable.

Better than doing key lookups on every iteration but awfully ugly and should be unnecessary. byPairs sounds good.

Reply via email to