As I mentioned in my message: If a developer implements __key, they are promising a certain contract. If your code sample here has any surprising behavior, then the library developer has violated the contract.
Yes, all bets are off at that point, but this isn't the only place that could happen.
If I had to take a guess, you're zealously against operator overloading?
I’m not zealously for or against anything .. I’m merely expressing an opinion based upon MY personal weighting of the pros and cons of a proposal. No doubt I have my biases, no more or less than others.
—Tim
|