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

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: