This paper proposes an extension of the notion of method as it is currently used in most object-oriented languages. We define polymethods as methods that we’can attach directly to types, as opposed to classes and that we can describe with a second-order type. Two benefits result from this extension; first, the expressive power of the language is improved with better modeling abilities. Next, second-order types yield a more powerful (precise) type inference, which extends the range of static type checking in a truly extensible object-oriented language. We first show that extensible objectoriented languages present many difficulties for static type-checking and that secondorder types are necessary to get stronger type-checking. We illustrate how to combine polymethods through type inheritance and propose a technique based on abstract interpretation to derive a second-order type for new polymethods.
CITATION STYLE
Caseau, Y., & Perron, L. (1993). Attaching second-order types to methods in an object-oriented language. In Lecture Notes in Computer Science (including subseries Lecture Notes in Artificial Intelligence and Lecture Notes in Bioinformatics) (Vol. 707 LNCS, pp. 142–160). Springer Verlag. https://doi.org/10.1007/3-540-47910-4_9
Mendeley helps you to discover research relevant for your work.