skip to main content
10.1145/1028976.1028987acmconferencesArticle/Chapter ViewAbstractPublication PagessplashConference Proceedingsconference-collections
Article

Super and inner: together at last!

Published: 01 October 2004 Publication History

Abstract

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 <b>super</b> 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 <b>inner</b>. 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.

References

[1]
P. America. Designing an object-oriented programming language with behavioural subtyping. In Proc. ACM International Workshop on Foundations of Object-Oriented Languages, volume 489 of Lecture Notes in Computer Science, pages 60--90. Springer-Verlag, 1991.]]
[2]
D. Ancona and E. Zucca. Overriding operators in a mixin-based framework. In Proc. Symposium on Programming Language Implementation and Logic Programming, pages 47--61, 1997.]]
[3]
D. Ancona and E. Zucca. A theory of mixin modules: Basic and derived operators. Mathematical Structures in Computer Science, 8(4):401--446, 1998.]]
[4]
L. Bettini, S. Capecchi, and B. Venneri. Extending Java to dynamic object behaviors. In Proc. Workshop on Object-Oriented Developments, volume 82. Elsevier, 2003.]]
[5]
G. Bracha and W. Cook. Mixin-based inheritance. In Proc. Joint ACM Conf. on Object-Oriented Programming, Systems, Languages and Applications and the European Conference on Object-Oriented Programming, Oct. 1990.]]
[6]
A. Clark. A layered object-oriented programming language. GEC Journal of Research, 11(2):173--180, 1994.]]
[7]
W. R. Cook. A Denotational Semantics of Inheritance. Ph.D. thesis, Department of Computer Science, Brown University, Providence, RI, May 1989.]]
[8]
D. Duggan. A mixin-based, semantics-based approach to reusing domain-specific programming languages. In Proc. European Conference on Object-Oriented Programming, volume 1850 of LNCS, pages 179--200, Berlin Heidelberg, 2000. Springer-Verlag.]]
[9]
E. Ernst. gbeta - a Language with Virtual Attributes, Block Structure, and Propagating, Dynamic Inheritance. PhD thesis, Department of Computer Science, University of Aarhus, Århus, Denmark, 1999.]]
[10]
E. Ernst. Propagating class and method combination. In Proc. European Conference on Object-Oriented Programming, LNCS 1628, pages 67--91. Springer-Verlag, June 1999.]]
[11]
R. B. Findler, C. Flanagan, M. Flatt, S. Krishnamurthi, and M. Felleisen. DrScheme: A pedagogic programming environment for Scheme. In Proc. Symposium on Programming Language Implementation and Logic Programming, pages 369--388, Sept. 1997.]]
[12]
M. Flatt. PLT MzScheme: Language manual. Technical Report TR97-280, Rice University, 1997.]]
[13]
M. Flatt. Programming Languages for Reusable Software Components. PhD thesis, Rice University, 1999.]]
[14]
M. Flatt, S. Krishnamurthi, and M. Felleisen. Classes and mixins. In Proc. ACM Symposium on Principles of Programming Languages, pages 171--183, Jan. 1998.]]
[15]
E. Gamma, R. Helm, R. Johnson, and J. Vlissides. Design Patterns: Elements of Reusable Object-Oriented Software. Addison Wesley, Massachusetts, 1994.]]
[16]
A. Goldberg and D. Robson. Smalltalk 80: The Language. Addison-Wesley, Reading, 1989.]]
[17]
J. Gosling, B. Joy, and G. Steele. The Java Language Specification. The Java Series. Addison-Wesley, Reading, MA, USA, June 1996.]]
[18]
S. E. Keene. Object-Oriented Programming in Common LISP, a Programmer's Guide to CLOS. Addison-Wesley, 1988.]]
[19]
R. Kelsey, W. Clinger, and J. Rees (Eds.). The revised5 report on the algorithmic language Scheme. ACM SIGPLAN Notices, 33(9), Sept. 1998.]]
[20]
O. Lehrmann Madsen, B. Moller-Pedersen, and K. Nygaard. Object-oriented programming in the BETA programming language. ACM Press/Addison-Wesley, 1993.]]
[21]
B. H. Liskov and J. Wing. Behavioral subtyping using in-variants and constraints. Technical Report CMU CS-99-156, School of Computer Science, Carnegie Mellon University, July 1999.]]
[22]
B. H. Liskov and J. M. Wing. A behavioral notion of subtyping. ACM Transactions on Computing Systems, November 1994.]]
[23]
J. Matthews, R. B. Findler, M. Flatt, and M. Felleisen. A visual environment for developing context-sensitive term rewriting systems. In Proc. International Conference on Rewriting Techniques and Applications, June 2004.]]
[24]
D. M. Oliveira. GNU EDMA. http://www.gnu.org/software/edma/edma.html.]]
[25]
B. Stroustrup. The C++ Programming Language. Addison-Wesley, third edition, 2000.]]
[26]
A. Wright and M. Felleisen. A syntactic approach to type soundness. Technical Report 160, Rice University, 1991. Information and Computation, volume 115(1), 1994, pp. 38--94.]]

Cited By

View all

Recommendations

Comments

Information & Contributors

Information

Published In

cover image ACM Conferences
OOPSLA '04: Proceedings of the 19th annual ACM SIGPLAN conference on Object-oriented programming, systems, languages, and applications
October 2004
462 pages
ISBN:1581138318
DOI:10.1145/1028976
  • cover image ACM SIGPLAN Notices
    ACM SIGPLAN Notices  Volume 39, Issue 10
    OOPSLA '04
    October 2004
    448 pages
    ISSN:0362-1340
    EISSN:1558-1160
    DOI:10.1145/1035292
    Issue’s Table of Contents
Permission to make digital or hard copies of all or part of this work for personal or classroom use is granted without fee provided that copies are not made or distributed for profit or commercial advantage and that copies bear this notice and the full citation on the first page. Copyrights for components of this work owned by others than ACM must be honored. Abstracting with credit is permitted. To copy otherwise, or republish, to post on servers or to redistribute to lists, requires prior specific permission and/or a fee. Request permissions from [email protected]

Sponsors

Publisher

Association for Computing Machinery

New York, NY, United States

Publication History

Published: 01 October 2004

Permissions

Request permissions for this article.

Check for updates

Author Tags

  1. augment
  2. inheritance
  3. inner
  4. override
  5. super

Qualifiers

  • Article

Conference

OOPSLA04

Acceptance Rates

Overall Acceptance Rate 268 of 1,244 submissions, 22%

Upcoming Conference

Contributors

Other Metrics

Bibliometrics & Citations

Bibliometrics

Article Metrics

  • Downloads (Last 12 months)0
  • Downloads (Last 6 weeks)0
Reflects downloads up to 20 Feb 2025

Other Metrics

Citations

Cited By

View all
  • (2013)Contracts for First-Class ClassesACM Transactions on Programming Languages and Systems10.1145/251818935:3(1-58)Online publication date: 1-Nov-2013
  • (2012)First-Class compositionsTransactions on Aspect-Oriented Software Development IX10.5555/2434958.2434967(216-267)Online publication date: 1-Jan-2012
  • (2012)First-Class CompositionsTransactions on Aspect-Oriented Software Development IX10.1007/978-3-642-35551-6_6(216-267)Online publication date: 2012
  • (2010)Contracts for first-class classesACM SIGPLAN Notices10.1145/1899661.186964245:12(97-112)Online publication date: 18-Oct-2010
  • (2010)Contracts for first-class classesProceedings of the 6th symposium on Dynamic languages10.1145/1869631.1869642(97-112)Online publication date: 18-Oct-2010
  • (2010)A model for composable composition operatorsProceedings of the 9th International Conference on Aspect-Oriented Software Development10.1145/1739230.1739248(145-156)Online publication date: 15-Mar-2010
  • (2007)A higher abstraction level using first-class inheritance relationsProceedings of the 21st European conference on Object-Oriented Programming10.5555/2394758.2394786(425-449)Online publication date: 30-Jul-2007
  • (2007)Featherweight wrap JavaProceedings of the 2007 ACM symposium on Applied computing10.1145/1244002.1244242(1094-1100)Online publication date: 11-Mar-2007
  • (2007)A Higher Abstraction Level Using First-Class Inheritance RelationsECOOP 2007 – Object-Oriented Programming10.1007/978-3-540-73589-2_20(425-449)Online publication date: 2007
  • (2006)Scheme with classes, mixins, and traitsProceedings of the 4th Asian conference on Programming Languages and Systems10.1007/11924661_17(270-289)Online publication date: 8-Nov-2006
  • Show More Cited By

View Options

Login options

View options

PDF

View or Download as a PDF file.

PDF

eReader

View online with eReader.

eReader

Figures

Tables

Media

Share

Share

Share this Publication link

Share on social media