3 ms·
Typeclasses can have sorta-inheritance, in the way that x may have to be an instance of typeclass X in order to implement typeclass Y.
by mercurial 13y ago
Typeclasses can have sorta-inheritance, in the way that x may have to be an instance of typeclass X in order to implement typeclass Y.
- jes5199 13y agoYeah. It's not clear to me that you can just do arbitrary overrides, though, like this type is the same as that one except with one function replaced. I can imagine building such a system out of Haskell primatives, though
- mercurial 13y agoAh, I believe overrides are quite out the question. You already can't have two methods with the same name and a different signatures...
- jes5199 13y agoOf course someone has already written a paper on implementing OO on top of Haskell: http://citeseerx.ist.psu.edu/viewdoc/download?doi=10.1.1.106.772&rep=rep1&type=pdf http://citeseerx.ist.psu.edu/viewdoc/download?doi=10.1.1.106...