Hacker News new | past | comments | ask | show | jobs | submit login

When reading the title, the first thing that struck me too was division by zero.

I doubt this is a common misunderstanding among any but the most junior of devs.




I chose divide-by-zero because it is super easy for everybody to understand.

But that is not important. In a real application it might be a unicode error, a date error, a wrong-format error or something else.


In a language with errors as values, 100% code coverage (and no `unwrap()`) would force you to handle all the types of errors you mention.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: