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

he appears to be referring to the http://en.wikipedia.org/wiki/Liskov_substitution_principle . Generally type systems don't enforce the invariants that subclasses have the power to break. It is the usually the duty of the programmer to ensure that subclasses don't break these invariants.

Invariants aren't things like whether methods are overidden or not, it's things like whether area for a shape can be computed by just knowing a side, exemplified with the familiar case of whether a rectangle should be a subclass of a square, or the other way around



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: