next up previous contents
Next: Subtyping of method types Up: Typing in object-oriented languages: Previous: Other typing problems

Toward more flexible type systems

  As pointed out in the last section, there are many circumstances under which we would like to change the types of methods in subclasses. What keeps us from making arbitrary changes to the types of these methods? The main complication in changing the types of methods in subclasses is that a method in a class may call any other method from the class by sending the appropriate message to self. That is, changes to one method may have an impact on both the typing and meaning of another method in the same class. In this section we discuss the changes to method types that are guaranteed not to cause typing problems.



 

Kim Bruce
10/28/1998