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

The first point is kind of silly: You can make rust-style constructor functions if you want, and have a private constructor to enforce the behavior.

Although it does require some boilerplate, which may seem like pointless extra work.



I think this was not the point, see:

> [...] only to realise there the class has a private constructor or that there are static constructors which I should be using [...]




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

Search: