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

Implementation inheritance is not just composition. Composition on its own does not allow for open recursion (implementing methods that were called on a base class in a derived class, via an in-built dispatch step), whereas inheritance does.


A virtual table and virtual dispatch are orthogonal to inheritance. Haskell let's you do the former without the latter. I agree that syntactic sugar for virtual dispatch is a nice language feature because it is tedious to do by hand




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

Search: