3 ms·
God, I hate this crap. Edge cases != useful knowledge
by lubujackson 14y ago
God, I hate this crap. Edge cases != useful knowledge
- CognitiveLens 14y agoAgreed. It seems like the lesson is "don't write ambiguous JS, because it will bite you" - I'm not sure you have to know the nature of every bite in order to be a JS expert, because a JS expert should generally be writing very predictable code!
- berntb 14y agoMany years ago, I had a bookmark in my Harbinson-Steele's C book, for the precedence of operators. After a while, I decided that was stupid and removed the bookmark -- if I ever needed to look at operator precedence, then I should use parentheses. That said, to understand the edge cases are valuable, because you should recognize when you get close to them (not only in your own code).
- jacobr 14y agoEdge cases !== useful knowledge FTFY
- yen223 14y agoThe second question (0.1 + 0.2) + 0.3 == 0.1 + (0.2 + 0.3) is not an edge case, unfortunately.