Generics and Constrained Polymorphism versus Subtyping
- by Rahul G
Hullo all.
In this (Warning: PDF) presentation on Haskell Type Classes, on slide #54, there's this question:
Open Question:
In a language with generics and
constrained polymorphism, do you need
subtyping too?
My questions are:
How do generics and constrained polymorphism make subtyping unnecessary?
If generics and constrained polymorphism make subtyping unnecessary, why does Scala have subtyping?