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

The author called out the newtype solution specifically in the first paragraph:

> it could push the task of precondition checking to its caller, and enforce via types (or an assert) that the precondition holds

(Emphasis mine)



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

Search: