Advertisement

Object-oriented multi-methods in Cecil

  • Craig Chambers
Conference paper
Part of the Lecture Notes in Computer Science book series (LNCS, volume 615)

Abstract

Multiple dispatching provides increased expressive power over single dispatching by guiding method lookup using the values of all arguments instead of only the receiver. However, existing languages with multiple dispatching do not encourage the data-abstraction-oriented programming style that is encouraged by traditional single-dispatching languages; instead existing multiple-dispatching languages tend to foster a function-oriented programming style organized around generic functions. We propose an alternative view of multiple dispatching that is intended to promote a data-abstraction-oriented programming style. Instead of viewing a multi-method as “outside” of all objects, we view a multi-method as “inside” the objects for which the multi-method applies (on which it dispatches). Because objects are closely connected to the multi-methods implementing their operations, the internals of an object can be encapsulated by being accessible only to the closely-connected multi-methods. We are exploring this object-oriented view of multi-methods in the context of a new programming language named Cecil.

Keywords

Formal Argument Privileged Access Instance Variable Abstract Data Type Multiple Inheritance 
These keywords were added by machine and not by the authors. This process is experimental and the keywords may be updated as the learning algorithm improves.

Preview

Unable to display preview. Download preview PDF.

Unable to display preview. Download preview PDF.

References

  1. [Agrawal et al. 91]
    Rakesh Agrawal, Linda G. DeMichiel, and Bruce G. Lindsay. Static Type Checking of Multi-Methods. In OOPSLA '91 Conference Proceedings, pp. 113–128, Phoenix, AZ, October, 1991. Published as SIGPLAN Notices 26(11), November, 1991.Google Scholar
  2. [Bobrow et al. 86]
    Daniel G. Bobrow, Kenneth Kahn, Gregor Kiczales, Larry Masinter, Mark Stefik, and Frank Zdybel. CommonLoops: Merging Lisp and Object-Oriented Programming. In OOPSLA '86 Conference Proceedings, pp. 17–29, Portland, OR, September, 1986. Published as SIGPLAN Notices 21(11), November, 1986.Google Scholar
  3. [Bobrow et al. 88]
    D. G. Bobrow, L. G. DeMichiel, R. P. Gabriel, S. E. Keene, G. Kiczales, D. A. Moon. Common Lisp Object System Specification X3J13. In SIGPLAN Notices 23(Special Issue), September, 1988.Google Scholar
  4. [Borning 86]
    A. H. Borning. Classes Versus Prototypes in Object-Oriented Languages. In Proceedings of the 1986 Fall Joint Computer Conference, pp. 36–40, Dallas, TX, November, 1986.Google Scholar
  5. [Chambers et al. 89]
    Craig Chambers, David Ungar, and Elgin Lee. An Efficient Implementation of SELF, a Dynamically-Typed Object-Oriented Language Based on Prototypes. In OOPSLA '89 Conference Proceedings, pp. 49–70, New Orleans, LA, October, 1989. Published as SIGPLAN Notices 24(10), October, 1989. Also published in Lisp and Symbolic Computation 4(3), Kluwer Academic Publishers, June, 1991.Google Scholar
  6. [Chambers et al. 91]
    Craig Chambers, David Ungar, Bay-Wei Chang, and Urs Hölzle. Parents are Shared Parts: Inheritance and Encapsulation in SELF. In Lisp and Symbolic Computation 4(3), Kluwer Academic Publishers, June, 1991.Google Scholar
  7. [Chambers & Ungar 91]
    Craig Chambers and David Ungar. Making Pure Object-Oriented Languages Practical. In OOPSLA '91 Conference Proceedings, pp. 1–15, Phoenix, AZ, October, 1991. Published as SIGPLAN Notices 26(10), October, 1991.Google Scholar
  8. [Chambers 92]
    Craig Chambers. The Design and Implementation of the SELF Compiler, an Optimizing Compiler for Object-Oriented Programming Languages. Ph.D. thesis, Department of Computer Science, Stanford University, March, 1992.Google Scholar
  9. [Chang & Ungar 90]
    Bay-Wei Chang and David Ungar. Experiencing SELF Objects: An Object-Based Artificial Reality. Unpublished manuscript, 1990.Google Scholar
  10. [Cook et al. 90]
    William Cook, Walter Hill, and Peter Canning. Inheritance is not Subtyping. In Conference Record of the 17th Annual ACM Symposium on Principles of Programming Languages, San Francisco, CA, January, 1990.Google Scholar
  11. [Ellis & Stroustrup 90]
    Margaret A. Ellis and Bjarne Stroustrup. The Annotated C++ Reference Manual. Addison-Wesley, Reading, MA, 1990.Google Scholar
  12. [Freeman-Benson 89]
    Bjorn N. Freeman-Benson. A Proposal for Multi-Methods in SELF. Unpublished manuscript, December, 1989.Google Scholar
  13. [Gabriel et al. 91]
    Richard P. Gabriel, Jon L. White, and Daniel G. Bobrow. CLOS: Integrating Object-Oriented and Functional Programming. In Communications of the ACM 34(9), pp. 28–38, September, 1991.CrossRefGoogle Scholar
  14. [Goldberg & Robson 83]
    Adele Goldberg and David Robson. Smalltalk-80: The Language and Its Implementation. Addison-Wesley, Reading, MA, 1983.Google Scholar
  15. [Goldberg 84]
    Adele Goldberg. Smalltalk-80: The Interactive Programming Environment. Addison-Wesley, Reading, MA, 1984.Google Scholar
  16. [Halbert & O'Brien 86]
    Daniel C. Halbert and Patrick D. O'Brien. Using Types and Inheritance in Object-Oriented Languages. Technical report DEC-TR-437, Digital Equipment Corp., April, 1986.Google Scholar
  17. [Harrison & Ossher 90]
    William Harrison and Harold Ossher. Subdivided Procedures: A Language Extension Supporting Extensible Programming. In Proceedings of the 1990 International Conference on Computer Languages, pp. 190–197, New Orleans, LA, March, 1990.Google Scholar
  18. [Hebel & Johnson 90]
    Kurt J. Hebel and Ralph E. Johnson. Arithmetic and Double Dispatching in Smalltalk-80. In Journal of Object-Oriented Programming 2(6), pp. 40–44, March, 1990.Google Scholar
  19. [Hölzle et al. 91a]
    Urs Hölzle, Bay-Wei Chang, Craig Chambers, Ole Agesen, and David Ungar. The SELF Manual, Version 1.1. Unpublished manual, February, 1991.Google Scholar
  20. [Hölzle et al. 91b]
    Urs Hölzle, Craig Chambers, and David Ungar. Optimizing Dynamically-Typed Object-Oriented Programming Languages with Polymorphic Inline Caches. In ECOOP '91 Conference Proceedings, pp. 21–38, Geneva, Switzerland, July, 1991.Google Scholar
  21. [Hölzle et al. 92]
    Urs Hölzle, Craig Chambers, and David Ungar. Debugging Optimized Code with Dynamic Deoptimization. To appear in Proceedings of the SIGPLAN '92 Conference on Programming Language Design and Implementation, San Francisco, CA, June, 1992.Google Scholar
  22. [Hudak et al. 90]
    Paul Hudak, Philip Wadler, Arvind, Brian Boutel, Jon Fairbairn, Joseph Fasel, Kevin Hammond, John Hughes, Thomas Johnsson, Dick Kieburtz, Rishiyur Nikhil, Simon Peyton Jones, Mike Reeve, David Wise, Jonathan Young. Report on the Programming Language Haskell, Version 1.0. Unpublished manual, April, 1990.Google Scholar
  23. [Ingalls 86]
    Daniel H. H. Ingalls. A Simple Technique for Handling Multiple Polymorphism. In OOPSLA '86 Conference Proceedings, pp. 347–349, Portland, OR, September, 1986. Published as SIGPLAN Notices 21(11), November, 1986.Google Scholar
  24. [Kiczales et al. 91]
    Gregor Kiczales, James des Rivières, and Daniel G. Bobrow. The Art of the Meta-Object Protocol. MIT Press, Cambridge, MA, 1991.Google Scholar
  25. [LaLonde et al. 86]
    Wilf R. LaLonde, Dave A. Thomas, and John R. Pugh. An Exemplar Based Smalltalk. In OOPSLA '86 Conference Proceedings, pp. 322–330, Portland, OR, September, 1986. Published as SIGPLAN Notices 21(11), November, 1986.Google Scholar
  26. [Leavens 89]
    Gary Todd Leavens. Verifying Object-Oriented Programs that use Subtypes. Ph.D. thesis, MIT, 1989.Google Scholar
  27. [Leavens & Weihl 90]
    Gary T. Leavens and William E. Weihl. Reasoning about Object-Oriented Programs that use Subtypes. In OOPSLA/ECOOP '90 Conference Proceedings, pp. 212–223, Ottawa, Canada, October, 1990. Published as SIGPLAN Notices 25(10), October, 1990.Google Scholar
  28. [Lieberman 86]
    Henry Lieberman. Using Prototypical Objects to Implement Shared Behavior in Object-Oriented Systems. In OOPSLA '86 Conference Proceedings, pp. 214–223, Portland, OR, September, 1986. Published as SIGPLAN Notices 21(11), November, 1986.Google Scholar
  29. [Lieberman et al. 87]
    Henry Lieberman, Lynn Andrea Stein, and David Ungar. The Treaty of Orlando. In Addendum to the OOPSLA '87 Conference Proceedings, pp. 43–44, Orlando, FL, October, 1987. Published as SIGPLAN Notices 23(5), May, 1988.Google Scholar
  30. [Meyer 88]
    Bertrand Meyer. Object-Oriented Software Construction. Prentice Hall, New York, 1988.Google Scholar
  31. [Meyer 92]
    Bertrand Meyer. Eiffel: The Language. Prentice Hall, New York, 1992.Google Scholar
  32. [Moon 86]
    David A. Moon. Object-Oriented Programming with Flavors. In OOPSLA '86 Conference Proceedings, pp. 1–8, Portland, OR, September, 1986. Published as SIGPLAN Notices 21(11), November, 1986.Google Scholar
  33. [Mugridge et al. 91]
    W. B. Mugridge, J. G. Hosking, and J. Hamer. Multi-Methods in a Statically-Typed Programming Language. Technical report #50, Department of Computer Science, University of Auckland, 1991.Google Scholar
  34. [Rees & Clinger 86]
    Jonathan Rees and William Clinger, editors. Revised 3 Report on the Algorithmic Language Scheme. In SIGPLAN Notices 21(12), December, 1986.Google Scholar
  35. [Rouaix 90]
    Francois Rouaix. Safe Run-Time Overloading. In Conference Record of the 17th Annual ACM Symposium on Principles of Programming Languages, pp. 355–366, San Francisco, CA, January, 1990.Google Scholar
  36. [Schaffert et al. 85]
    Craig Schaffert, Topher Cooper, and Carrie Wilpolt. Trellis Object-Based Environment, Language Reference Manual. Technical report DEC-TR-372, November, 1985.Google Scholar
  37. [Schaffert et al. 86]
    Craig Schaffert, Topher Cooper, Bruce Bullis, Mike Kilian, and Carrie Wilpolt. An Introduction to Trellis/Owl. In OOPSLA '86 Conference Proceedings, pp. 9–16, Portland, OR, September, 1986. Published as SIGPLAN Notices 21(11), November, 1986.Google Scholar
  38. [Snyder 86]
    Alan Snyder. Encapsulation and Inheritance in Object-Oriented Programming Languages. In OOPSLA '86 Conference Proceedings, pp. 38–45, Portland, OR, September, 1986. Published as SIGPLAN Notices 21(11), November, 1986.Google Scholar
  39. [Ungar & Smith 87]
    David Ungar and Randall B. Smith. SELF: The Power of Simplicity. In OOPSLA '87 Conference Proceedings, pp. 227–241, Orlando, FL, October, 1987. Published as SIGPLAN Notices 22(12), December, 1987. Also published in Lisp and Symbolic Computation 4(3), Kluwer Academic Publishers, June, 1991.Google Scholar
  40. [Ungar et al. 91]
    David Ungar, Craig Chambers, Bay-Wei Chang, and Urs Hölzle. Organizing Programs without Classes. In Lisp and Symbolic Computation 4(3), Kluwer Academic Publishers, June, 1991.Google Scholar

Copyright information

© Springer-Verlag Berlin Heidelberg 1992

Authors and Affiliations

  • Craig Chambers
    • 1
  1. 1.Department of Computer Science and EngineeringUniversity of WashingtonSeattle

Personalised recommendations