Hacker News new | past | comments | ask | show | jobs | submit login

Gah. The very interesting question that the author asks is whether we should use the type system to help us enforce validation constraints, and in particular, security constraints -- a great idea that I've seen discussed elsewhere. But unfortunately he takes a wrong turn and assumes that this implies a subclassing relationship, where these validated string class derive from an abstract string class. This makes no sense from an OO perspective; nothing about a string class is "abstract," and it's better to favor composition over inheritance.



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

Search: