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

It encourages people to use strongly typed classes rather than primitives, even if the type simply wraps a primitive.

As a result you can't pass a invalid (say) accountID deep into your code, bc validity is guaranteed to be checked early when you "parse" an input string into the "AccountId" type.

So: internal interfaces defined using non-primitive types, so internal methods don't need to keep validating their input. Conversion to said types happens early and predictably, catching bad values before they (eg) hit the database.



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

Search: