Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
skip to main content
10.1145/286936.286977acmconferencesArticle/Chapter ViewAbstractPublication PagessplashConference Proceedingsconference-collections
Article
Free access

Multiple dispatch as dispatch on Tuples

Published: 01 October 1998 Publication History
  • Get Citation Alerts
  • Abstract

    Many popular object-oriented programming languages, such as C++, Smalltalk-80, Java, and Eiffel, do not support multiple dispatch. Yet without multiple dispatch, programmers find it difficult to express binary methods and design patterns such as the "visitor" pattern. We describe a new, simple, and orthogonal way to add multimethods to single-dispatch object-oriented languages, without affecting existing code. The new mechanism also clarifies many differences between single and multiple dispatch.

    References

    [1]
    American National Standards Institute. Reference Manual for the Ada Programming Language. ANSI/MIL- STD ! 815A, February, 1983.
    [2]
    Roberto M. Amadio and L. Cardelli. Subtyping recursive types. ACM Transactions on Programming Languages and Systems, 15(4):575-631, 1993.
    [3]
    Ken Arnold and James Gosling. The Java Programming Language. Second Edition, Addison- Wesley, Reading, Mass., 1998.
    [4]
    Gerald Baumgartner, Konstantin L~iufer, Vincent E Russo. On the Interaction of Object- Oriented Design patterns and Programming Languages. Technical Report CSD-TR-96-020, Department of Computer Science, Purdue University, February 1996.
    [5]
    Daniel G. Bobrow, Kenneth Kahn, George Kiczales, Larry Masinter, Mark Stefik, and Frank Zdybel. CommonLoops: Merging Lisp and Object-Oriented Programming. In Norman Meyrowitz (editor), OOPSLA '86 Conference Proceedings, Portland, Oregon, September 1986, volume 21, number i1 of ACM SIGPLAN Notices, pp. 17-29. ACM, New York, November, 1986.
    [6]
    Fran~:ois Bourdoncle and Stephan Merz. Type Checking Higher-Order Polymorphic Multi- Methods. Conference Record of POPL '97: The 24th ACM SIGPLAN-SIGACT Symposium on Principles of Programming Languages, Paris, France, pp. 302-315. ACM, New York, January 1997.
    [7]
    John Boyland and Giuseppe Castagna. Parasitic Methods: An Implementation of Multi-Methods for Java. Proceedings of the ACM SIGPLAN Conference on Object-Oriented Programming Systems, Languages and Applications (OOPSLA '97). Volume 32, number i0 ofACM SIGPLAN Notices, pp. 66- 76. ACM, New York, November 1997.
    [8]
    Kim B. Bruce and Jon Crabtree and Thomas E Murtagh and Robert van Gent and Allyn Dimock and Robert Muller. Safe and decidable type checking in an object-oriented language. In Andreas Paepcke (editor), OOPSLA '93 Conference Proceedings. Volume 28, number 10 of ACM SIGPLAN Notices, pp. 29-46. ACM, New York, October, 1993.
    [9]
    Kim Bruce, Luca Cardelli, Giuseppe Castagna, The Hopkins Object Group, Gary T. Leavens, and Benjamin Pierce. On Binary Methods. Theory and Practice of Object Systems, 1(3):221-242, 1995.
    [10]
    Luca Cardelli. A Semantics of Multiple inheritance. Information and Computation, 76(2/3):138- 164, February/March, 1988. An earlier version appeared in the 1984 Semantics of Data Types Symposium, LNCS 173, pp. 51-66, Springer-Verlag, 1984.
    [11]
    Giuseppe Castagna, Giorgio Ghelli, and Giuseppe Longo. A Calculus for Overloaded Functions with Subtyping. In Proceedings of the 1992 ACM Conference on Lisp and Functional Programming, San Francisco, June, 1992, pp. 182-192, volume 5, number l of LISP Pointers. ACM, New York, January-March, 1992.
    [12]
    Giuseppe Castagna. Covariance and contravariance: conflict without a cause. ACM Transactions on Programming Languages and Systems, 17(3):431-447, 1995. See also {Chapter 5, Castagna 97}.
    [13]
    Giuseppe Castagna. Object-Oriented Programming A Unified Foundation. Birkh~iuser, Boston, 1997.
    [14]
    Craig Chambers. Object-Oriented Multi- Methods in Cecil. In O. Lehrmann-Madsen, editor, ECOOP '92 Conference Proceedings, Utrecht, the Netherlands, June~July, 1992, volume 615 of Lecture Notes in Computer Science, pp. 33-56. Springer-Verlag, Berlin, 1992.
    [15]
    Craig Chambers. The Cecil Language: Specification and Rationale: Version 2.0. Department of Computer Science and Engineering, University of Washington, December, 1995. http:// w w w. cs. w ash i ngto n.ed u/researc h/proj e ct s/c ec il/w w w/ Papers/cecil-spec.html
    [16]
    Craig Chambers and Gary T. Leavens. Typechecking and Modules for Multi-Methods. ACM Transactions on Programming Languages and Systems, 17(6):805-843. November, 1995.
    [17]
    Craig Chambers and Gary T. Leavens. BeCeciI, A Core Object-Oriented Language with Block Structure and Multimethods: Semantics and Typing. Department of Computer Science, Iowa State University, TR #96-17a, April 1997. ftp:// ftp.cs.iastate.edu/pub/techreports/TR96-17/TR.ps.Z; the appendix sections only are in ftp://ftp.cs.iastate.edu/pub/ techreports/TR96-17/appendix.ps.Z.
    [18]
    William Cook, Walter L. Hill, and Peter S. Canning. Inheritance is not Subtyping. In Conference Record of the Seventeenth Annual ACM Symposium on Principles of Programming Languages, San Francisco, California, pp 125-135. ACM, New York, 1990.
    [19]
    William Cook. Object-Oriented Programming versus Abstract Data Types. In J.W. de Bakker, W.E de Roever, and G. Rozenberg, editors, Foundations of Object- Oriented Languages, REX School~Workshop Proceedings, Noordwijkerhout, the Netherlands, May~June, 1990, volume 489 of Lecture Notes in Computer Science, pp. 151 - 178. Springer-Verlag, New York, 1991.
    [20]
    Michael D. Ernst, Craig Kaplan, and Craig Chambers. Predicate Dispatching: A Unified Theory of Dispatch. To appear in ECOOP '98, the 12th European Conference on Object-Oriented Programming, Brussels, Belgium, July, 1998. Also http://www.cs.washington.edu/ research/pr~jects/cecil/www/www/Papers/gud'html"
    [21]
    Neal Feinberg, Sonya E. Keene, Robert O. Mathews, and E Tucker Withington. The Dylan Programming Book. Addison-Wesley Longman, Reading, Mass., 1997.
    [22]
    Erich Gamma and Richard Helm and Ralph Johnson and John Vlissides. Design Patterns: Elements of Reusable Object-Oriented Software. Addison- Wesley, Reading, Mass., 1995.
    [23]
    Joseph A. Goguen and Jose Meseguer. Order-Sorted Algebra Solves the Constructor- Selector, Multiple Representation and Coercion Problems. In Symposium on Logic in Computer Science, Ithaca, NY, pp. 18-29. IEEE Press, NY, June, 1987.
    [24]
    Adele Goldberg and David Robson. Smalltalk-80: The Language and its Implementation. Addison-Wesley, Reading, Mass., 1983.
    [25]
    James Gosling, Bill Joy, Guy Steele, Guy L. Steele. The Java Language Specification. Addison- Wesley, Reading, Mass., 1996.
    [26]
    D. H. H. Ingalls. A Simple Technique for Handling Multiple Polymorphism. In Norman Meyrowitz, editor, OOPSLA '86 Conference Proceedings, Portland, Oregon, November, 1986, volume 21, number 11 of ACM SIGPLAN Notices, pp. 347-349. ACM, New York, October, 1986.
    [27]
    Gregor Kiczales and Luis H. Rodriguez Jr. Efficient Method Dispatch in PCL. In
    [28]
    , Chapter 14.
    [29]
    Bertrand Meyer. Eiffel: The Language. Prentice Hall, New York, 1992.
    [30]
    Bertrand Meyer. Object-Oriented Software Construction. Second Edition, Prentice Hall, New York, 1997.
    [31]
    Robin Milner, Mads Tofte, and Robert Harper. The Definition of Standard ML. MIT Press, Cambridge, MA, 1990.
    [32]
    David A. Moon. Object-Oriented Programming with Flavors. In Norman Meyrowitz (editor), OOPSLA '86 Conference Proceedings, Portland, Oregon, September 1986, volume 21, number 11 of ACM SIGPLAN Notices, pp. 1-8. ACM, New York, November, 1986.
    [33]
    Andreas Paepcke. Object-Oriented Programming: The CLOS Perspective. MIT Press, 1993.
    [34]
    John C. Reynolds. Using Category Theory to Design implicit Conversions and Generic Operators. In Neil D. Jones (editor), Semantics-Directed Compiler Generation, Proceedings of a Workshop, Aarhus, Denmark, pp. 211-258. Volume 94 of Lecture Notes in Computer Science, Springer-Verlag, NY, 1980.
    [35]
    David A. Schmidt. The Structure of Typed Programming Languages. MIT Press, Cambridge, Mass., 1994.
    [36]
    Andrew Shalit. The Dylan Reference Manual: The Definitive Guide to the New Object-Oriented Dynamic Language. Addison-Wesley, Reading, Mass., 1997.
    [37]
    Guy L. Steele Jr. Common Lisp: The Language (second edition). Digital Press, Bedford, MA, 1990.
    [38]
    Bjarne Stroustrup. The C++ Programming Language: Third Edition. Addison-Wesley, Reading, Mass., 1997.

    Cited By

    View all

    Recommendations

    Comments

    Information & Contributors

    Information

    Published In

    cover image ACM Conferences
    OOPSLA '98: Proceedings of the 13th ACM SIGPLAN conference on Object-oriented programming, systems, languages, and applications
    October 1998
    428 pages
    ISBN:1581130058
    DOI:10.1145/286936
    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 1998

    Permissions

    Request permissions for this article.

    Check for updates

    Author Tags

    1. binary methods
    2. generic functions
    3. language design
    4. multimethods
    5. multiple dispatch
    6. semantics
    7. single dispatch
    8. tuple
    9. typing

    Qualifiers

    • Article

    Conference

    OOPSLA98
    Sponsor:

    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)93
    • Downloads (Last 6 weeks)16
    Reflects downloads up to 11 Aug 2024

    Other Metrics

    Citations

    Cited By

    View all
    • (2019)Decidable tag-based semantic subtyping for nominal types, tuples, and unionsProceedings of the 21st Workshop on Formal Techniques for Java-like Programs10.1145/3340672.3341115(1-11)Online publication date: 15-Jul-2019
    • (2011)JavaGIACM Transactions on Programming Languages and Systems10.1145/1985342.198534333:4(1-83)Online publication date: 1-Jul-2011
    • (2008)Multiple dispatch in practiceACM SIGPLAN Notices10.1145/1449955.144980843:10(563-582)Online publication date: 19-Oct-2008
    • (2008)Multiple dispatch in practiceProceedings of the 23rd ACM SIGPLAN conference on Object-oriented programming systems languages and applications10.1145/1449764.1449808(563-582)Online publication date: 19-Oct-2008
    • (2007)Featherweight Java with multi-methodsProceedings of the 5th international symposium on Principles and practice of programming in Java10.1145/1294325.1294337(83-92)Online publication date: 5-Sep-2007
    • (2007)Making generic functions useable in SmalltalkProceedings of the 45th annual ACM Southeast Conference10.1145/1233341.1233349(36-41)Online publication date: 23-Mar-2007
    • (2007)Multiple dispatch in reflective runtime environmentComputer Languages, Systems and Structures10.1016/j.cl.2005.09.00133:2(60-78)Online publication date: 1-Jul-2007
    • (2006)MultiJavaACM Transactions on Programming Languages and Systems10.1145/1133651.113365528:3(517-575)Online publication date: 1-May-2006
    • (2005)Efficient multimethods in a single dispatch languageProceedings of the 19th European conference on Object-Oriented Programming10.1007/11531142_15(337-361)Online publication date: 25-Jul-2005
    • (2003)Relaxed MultiJavaACM SIGPLAN Notices10.1145/949343.94932538:11(224-240)Online publication date: 26-Oct-2003
    • Show More Cited By

    View Options

    View options

    PDF

    View or Download as a PDF file.

    PDF

    eReader

    View online with eReader.

    eReader

    Get Access

    Login options

    Media

    Figures

    Other

    Tables

    Share

    Share

    Share this Publication link

    Share on social media