TY - GEN
T1 - Super and inner - Together at last!
AU - Goldberg, David S.
AU - Findler, Robert Bruce
AU - Flatt, Matthew
PY - 2004
Y1 - 2004
N2 - In an object-oriented language, a derived class may declare a method with the same signature as a method in the base class. The meaning of the re-declaration depends on the language. Most commonly, the new declaration overrides the base declaration, perhaps completely replacing it, or perhaps using super to invoke the old implementation. Another possibility is that the base class always controls the method implementation, and the new declaration merely augments the method in the case that the base method calls inner. Each possibility has advantages and disadvantages. In this paper, we explain why programmers need both kinds of method redeclaration, and we present a language that integrates them. We also present a formal semantics for the new language, and we describe an implementation for MzScheme.
AB - In an object-oriented language, a derived class may declare a method with the same signature as a method in the base class. The meaning of the re-declaration depends on the language. Most commonly, the new declaration overrides the base declaration, perhaps completely replacing it, or perhaps using super to invoke the old implementation. Another possibility is that the base class always controls the method implementation, and the new declaration merely augments the method in the case that the base method calls inner. Each possibility has advantages and disadvantages. In this paper, we explain why programmers need both kinds of method redeclaration, and we present a language that integrates them. We also present a formal semantics for the new language, and we describe an implementation for MzScheme.
KW - Augment
KW - Inheritance
KW - Inner
KW - Override
KW - Super
UR - https://www.scopus.com/pages/publications/12844268516
UR - https://www.scopus.com/inward/citedby.url?scp=12844268516&partnerID=8YFLogxK
M3 - Conference contribution
AN - SCOPUS:12844268516
SN - 1581138318
SN - 9781581138313
T3 - 19th Annual ACM Conference on Object-Oriented Programming, Systems, Languages, and Applications, OOPSLA'04
SP - 116
EP - 129
BT - OOPSLA'04 - Conference Proceedings
T2 - 19th Annual ACM Conference on Object-Oriented Programming, Systems, Languages, and Applications, OOPSLA'04
Y2 - 24 October 2004 through 28 October 2004
ER -