3 ms·
If it does anything at all, it certainly shouldn't generate NaN
by pekk 13y ago
If it does anything at all, it certainly shouldn't generate NaN
- tel 13y agoWhy not? If (+) is numeric addition and coercion is free then {} is NaN and so is {} and so is NaN + (anything) and so is (anything) + NaN. Which is not to say that it's a good choice, but instead to say that the badness stems from overloading (+) too much and having free coercion.