typeid(double) does not respect NaNs

Jonathan M Davis jmdavisProg at gmx.com
Tue Jul 9 14:11:59 PDT 2013


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


More information about the Digitalmars-d mailing list