Hacker News new | past | comments | ask | show | jobs | submit login
James Bennett: Raise the right exceptions (b-list.org)
3 points by PaulHoule 11 months ago | hide | past | favorite | 2 comments



python is becoming a weird language. we introduced type checking so we don't have to do these mental gymnastics. and yet as the article suggests, there are still reasons to do them.


The same issues come up in Java. It is not so clear if an exception you design should be checked or unchecked, if you should derive from IllegalArgumentException when appropriate, or just throw an IllegalArgumentException, etc.




Consider applying for YC's W25 batch! Applications are open till Nov 12.

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

Search: