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)



Consider applying for YC's Summer 2026 batch! Applications are open till May 4

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

Search: