Re: typeid(double) does not respect NaNs

2013-07-09 Thread deadalnix
On Tuesday, 9 July 2013 at 17:04:47 UTC, Jonathan M Davis wrote: On Tuesday, July 09, 2013 18:04:29 Maxim Fomin wrote: On Tuesday, 9 July 2013 at 13:46:48 UTC, H. S. Teoh wrote: > On Tue, Jul 09, 2013 at 08:05:35AM +0200, deadalnix wrote: >> On Tuesday, 9 July 2013 at 03:03:34 UTC, H. S. Teoh wr

Re: typeid(double) does not respect NaNs

2013-07-09 Thread monarch_dodra
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

Re: typeid(double) does not respect NaNs

2013-07-09 Thread bearophile
Jonathan M Davis: I'm afraid that you'll have to be more specific in terms of what you mean. Please ignore what I have said... As such, I see no reason why it should matter that NaN is effectively unusable as an AA key. OK. Bye, bearophile

Re: typeid(double) does not respect NaNs

2013-07-09 Thread Jonathan M Davis
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.

Re: typeid(double) does not respect NaNs

2013-07-09 Thread bearophile
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". Bye, bearophile

Re: typeid(double) does not respect NaNs

2013-07-09 Thread Jonathan M Davis
On Tuesday, July 09, 2013 18:04:29 Maxim Fomin wrote: > On Tuesday, 9 July 2013 at 13:46:48 UTC, H. S. Teoh wrote: > > On Tue, Jul 09, 2013 at 08:05:35AM +0200, deadalnix wrote: > >> On Tuesday, 9 July 2013 at 03:03:34 UTC, H. S. Teoh wrote: > >> >More to the point, *if* typeinfo isn't meant to mat

Re: typeid(double) does not respect NaNs

2013-07-09 Thread Maxim Fomin
On Tuesday, 9 July 2013 at 13:46:48 UTC, H. S. Teoh wrote: On Tue, Jul 09, 2013 at 08:05:35AM +0200, deadalnix wrote: On Tuesday, 9 July 2013 at 03:03:34 UTC, H. S. Teoh wrote: >More to the point, *if* typeinfo isn't meant to match == for >whatever >reason, then why is it being used as the stan

Re: typeid(double) does not respect NaNs

2013-07-09 Thread H. S. Teoh
On Tue, Jul 09, 2013 at 08:05:35AM +0200, deadalnix wrote: > On Tuesday, 9 July 2013 at 03:03:34 UTC, H. S. Teoh wrote: > >More to the point, *if* typeinfo isn't meant to match == for whatever > >reason, then why is it being used as the standard of comparison for > >AA keys? > > > > I guess we nee

Re: typeid(double) does not respect NaNs

2013-07-08 Thread deadalnix
On Tuesday, 9 July 2013 at 03:03:34 UTC, H. S. Teoh wrote: More to the point, *if* typeinfo isn't meant to match == for whatever reason, then why is it being used as the standard of comparison for AA keys? I guess we need NaN == NaN to be true for AA keys, no ?

typeid(double) does not respect NaNs

2013-07-08 Thread H. S. Teoh
http://d.puremagic.com/issues/show_bug.cgi?id=7836 Upon closer inspection, however, it seems that this may have been deliberate??? Here's the code from rt/typeinfo/ti_double.d: class TypeInfo_d : TypeInfo { // ... static bool _equals(double f1, double f2) {