On Tuesday, 9 July 2013 at 21:12:15 UTC, Jonathan M Davis wrote:
On Tuesday, July 09, 2013 19:19:18 bearophile wrote:
Jonathan M Davis:
> That being the case, I'd argue in favor of language
> consistency
Here I'd like D AAs act as Python dicts. This means breaking
"consistency".
I'm afraid that you'll have to be more specific in terms of
what you mean.
But as far as I can tell, using floating point values as keys
in an AA is
fundamentally broken, because using == with floating point
values is
fundamentally broken. As such, I see no reason why it should
matter that NaN
is effectively unusable as an AA key.
- Jonathan M Davis
Using floating point as keys can make sense in an ordered
container actually. Just thought I'd point it out.
Basically, instead of looking for specific keys, you try to
position yourself between two entries.
But since our AA's are hashed sets, then no, it doesn't make
sense for us."