Skip to main content

Multi-methods in a statically-typed programming language

  • Conference paper
  • First Online:
Book cover ECOOP'91 European Conference on Object-Oriented Programming (ECOOP 1991)

Part of the book series: Lecture Notes in Computer Science ((LNCS,volume 512))

Included in the following conference series:

Abstract

Multivariant functions in Kea are a statically-typed form of the multi-methods of CLOS (Keene, 1989) but encapsulation is retained. Multivariants permit fine typing distinctions to be made, allow despatching to be avoided in some cases, and may be used to avoid some restrictions of the contravariance rule.

Once multivariant functions are introduced by example, the semantics of the despatch of multivariants are provided, based on the generation of despatching variants. Three issues arise with despatching: redundancy, ambiguity, and exhaustiveness of a (partially-ordered) set of variants with respect to a function call. It is shown that the approach taken here is consistent with separate compilation.

This is a preview of subscription content, log in via an institution to check access.

Access this chapter

Institutional subscriptions

Preview

Unable to display preview. Download preview PDF.

Unable to display preview. Download preview PDF.

References

  • Canning P S, Cook W R, Hill W L, Olthoff W G, 1989. Interfaces for strongly-typed object-oriented programming, OOPSLA'89, ACM SIGPLAN Notices, 24 (10) October, 1989, pp457–467.

    Article  Google Scholar 

  • Cardelli L, Wegner P, 1985. On understanding types, data abstraction, and polymorphism, Computing Surveys, 17(4), pp471–522.

    Article  Google Scholar 

  • Cook W, 1989. A proposal for making Eiffel type safe, in Cook S (Ed), ECOOP 89, Cambridge University Press, pp 57–70.

    Google Scholar 

  • Dahl O J, Nygaard K, 1966. Simula — an Algol-based simulation language, CACM 9 (9), pp671–678.

    MATH  Google Scholar 

  • Field A J, Harrison P G, 1988. Functional Programming, Addison-Wesley.

    Google Scholar 

  • Goldberg A, Robson D, 1983. Smalltalk 80: The Language and its Implementation, Addison-Wesley.

    Google Scholar 

  • Halbert D C, O'Brien P D, 1987. Using types and inheritance in object-oriented programming, IEEE Software, September 1987, pp71–79.

    Google Scholar 

  • Hamer J, Hosking J G, Mugridge W B, 1989. Knowledge-based systems for representing codes of practice, Report 48, Department of Computer Science, University of Auckland, New Zealand.

    Google Scholar 

  • Hamer J, 1990a. Expert Systems for codes of practice, PhD Thesis, Department of Computer Science, University of Auckland, New Zealand.

    Google Scholar 

  • Hamer J, 1990b. Class Language runtime system: detailed specification, BRANZ Contract 85-024, Technical Report No. 9, Department of Computer Science, University of Auckland, New Zealand.

    Google Scholar 

  • Hosking J G, Hamer J, Mugridge W B, 1990. Integrating functional and object-oriented programming, Procs. Pacific Tools 80 Conference, Sydney, Australia, November 1990.

    Google Scholar 

  • Keene S E, 1989. Object-Oriented Programming in Common Lisp: A Programmer's Guide to CLOS, Addison-Wesley, 1989.

    Google Scholar 

  • Meyer B, 1988. Object-Oriented Software Construction, Prentice Hall.

    Google Scholar 

  • Mugridge W B, Hosking J G, Hamer J, 1990. Functional extensions to an object-oriented programming language, Report No. 49, Department of Computer Science, University of Auckland, New Zealand.

    Google Scholar 

  • Mugridge W B, Hamer J, Hosking J G, 1991a. The semantics of multivariant functions, in preparation.

    Google Scholar 

  • Mugridge W B, Hamer J, Hosking J G, 1991b. Type loss in statically-typed object-oriented proghramming languages, in preparation.

    Google Scholar 

  • Smith J M, Smith D C P, 1977. Database abstractions: aggregation and generalization, ACM Trans. on Database Systems, 2 (2), 1977, pp105–133.

    Article  Google Scholar 

Download references

Author information

Authors and Affiliations

Authors

Editor information

Pierre America

Rights and permissions

Reprints and permissions

Copyright information

© 1991 Springer-Verlag Berlin Heidelberg

About this paper

Cite this paper

Mugridge, W.B., Hamer, J., Hosking, J.G. (1991). Multi-methods in a statically-typed programming language. In: America, P. (eds) ECOOP'91 European Conference on Object-Oriented Programming. ECOOP 1991. Lecture Notes in Computer Science, vol 512. Springer, Berlin, Heidelberg. https://doi.org/10.1007/BFb0057029

Download citation

  • DOI: https://doi.org/10.1007/BFb0057029

  • Published:

  • Publisher Name: Springer, Berlin, Heidelberg

  • Print ISBN: 978-3-540-54262-9

  • Online ISBN: 978-3-540-47537-8

  • eBook Packages: Springer Book Archive

Publish with us

Policies and ethics