News for hackers. Stuff that matters.
Re:NaNs Just Don't Get No Respect by saurik on Saturday August 18, 2012 @03:27AM (#4400506)
The things this author likes about NaN are also properties of NULL in many environments (that NULL cannot be compared to NULL, that operating on NULL returns NULL, etc.); so while you might not see many languages default initializing things to NaN, you do see them default initializing things to NULL with similar effect.
Re:NaNs Just Don't Get No Respect by duaneb on Saturday August 18, 2012 @04:36AM (#4400608)
Except this is actually worse, since there are many possible values which evaluate to NaN.

EDIT: I do not know how D implements NaNs; they may have magic to make them more sane to work with.

Re:NaNs Just Don't Get No Respect by WalterBright on Saturday August 18, 2012 @05:25AM (#4400677)
D does not implement NaNs, it just relies on the IEEE FP hardware to do it.

What D does do is expose NaNs so the programmer can rely on their existence and use them in a straightforward manner.