News for hackers. Stuff that matters.
Re:Adding Modules to C in 10 Lines of Code [pdf] by WalterBright on Monday June 27, 2022 @02:23PM (#31898560)
> float default is NaN, why... just WHY!!!!!

All operations that are fed NaN as an operand produce a NaN result. This makes it very obvious when the initialization of a float has been neglected. Defaulting to 0.0 means uninitialization bugs are nearly impossible to detect.

> char default is 0xFF....

Same thing. It's intended to flush out uninitialization bugs.

There are no comments on this comment yet.