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

Ah yeah, I guess I assumed by the use of the term "contructor" that GP meant a language like Python or Java, and in some cases it can difficult to prevent misuse by making an unsafe constructor private and only providing a public safe contructor that returns a sum type.

I definitely agree returning a sum type is ideal.



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

Search: