Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Trying to keep an open mind here–if your constructor arguments are plain wrong then who should be throwing the error then? The Factory? The Builder? And what if they don't exist in the first place?


Ideally you’d use the type system to ensure that arguments can’t be wrong.

For example, if arg values can’t be negative, use an unsigned arg type.




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

Search: