News for hackers. Stuff that matters.
Re:Learning Elm has gotten me confused about static vs. dyna... by kazinator on Tuesday June 14, 2016 @10:15PM (#11906802)
What? NaN is actually a number in the sense of being in the domain of the floating-point type. You seem to be mixing up "not a number" (as in character string or list) versus "not a number" as in a special IEEE representation that has special uses in numeric code.

A floor function that returns NaN when given a string, instead of throwing a type mismatch exception, is crap design, and a strawman example of that type of checking. It's not an appropriate use of NaN!

Re:Learning Elm has gotten me confused about static vs. dyna... by jdmichal on Tuesday June 14, 2016 @11:19PM (#11906997)
I agree with you [0], but that's what JavaScript gives us to work with.

[0] https://news.ycombinator.com/item?id=11898046