OO languages have methods, too
How does subtyping play here
Again, the question is, under what conditions is it meaningful to apply a function to an argument?
The basic rule is:
Given
f: S ? T
a : S’ and S’ <= S
Then
f(a) is meaningful and f(a): T
Previous slide
Next slide
Back to first slide
View graphic version