Skip to main content

A statically safe alternative to virtual types

  • Conference paper
  • First Online:
ECOOP’98 — Object-Oriented Programming (ECOOP 1998)

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

Included in the following conference series:

Abstract

Parametric types and virtual types have recently been proposed as extensions to Java to support genericity. In this paper we investigate the strengths and weaknesses of each. We suggest a variant of virtual types which has similar expressiveness, but supports safe static type checking. This results in a language in which both parametric types and virtual types are well-integrated, and which is statically type-safe.

Kim Bruce's research was partially supported by NSF grant CCR-9424123.

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

  1. Ole Agesen, Stephen Freund, and John C. Mitchell. Adding parameterized types to Java. In Symposium on Object-Oriented Programming: Systems, Languages, and Applications, ACM, 1997.

    Google Scholar 

  2. Kim B. Bruce, Luca Cardelli, Giuseppe Castagna, The Hopkins Objects Group, Gary T. Leavens, and Benjamin Pierce. On binary methods. Theory and Practice of Object-Oriented Systems, 1(3): 221–242, 1995.

    Google Scholar 

  3. Kim B. Bruce, Adrian Fiech, and Leaf Petersen. Subtyping is not a good “match” for object-oriented languages. In ECOOP '97, pages 104–127. LNCS 1241, Springer-Verlag, 1997.

    Google Scholar 

  4. Kim B. Bruce. A paradigmatic object-oriented programming language: design, static typing and semantics. Journal of Functional Programming, 4(2):127–206, 1994.

    Article  MATH  MathSciNet  Google Scholar 

  5. Kim B. Bruce. Increasing Java's expressiveness with ThisType and matchbounded polymorphism. Technical report, Williams College, 1997. Available via http://www.cs.williams.edu/~kim/README.html.

    Google Scholar 

  6. Kim B. Bruce. Safe static type checking with systems of mutually recursive classes and inheritance. Technical report, Williams College, 1997.

    Google Scholar 

  7. Kim B. Bruce, Angela Schuett, and Robert van Gent. PolyTOIL: A type-safe polymorphic object-oriented language, extended abstract. In European Conference on Object-Oriented Programming, pages 27–51, LNCS 952, Springer-Verlag, 1995.

    Google Scholar 

  8. Peter Canning, William Cook, Walter Hill, Walter Olthoff, and John C. Mitchell, F-bounded polymorphism for object-oriented programming. In Conference on Functional Programming Languages and Computer Architecture, pages 273–280, ACM, 1989.

    Google Scholar 

  9. Corky Cartwright and Guy Steele. Yet another parametric types proposal. Message to Java genericity mailing list, August, 1997.

    Google Scholar 

  10. Erich Gamma, Richard Helm, Ralph Johnson, and John Vlissides. Design Patterns. Addison-Wesley, 1995.

    Google Scholar 

  11. Andrew Koenig and Barbara Moo. Ruminations on C++. Addison-Wesley, 1996.

    Google Scholar 

  12. B. B. Kristensen, O. L. Madsen, B. Møller-Pedersen, and K. Nygaard. Abstraction mechanisms in the Beta programming language. In Symposium on Principles of Programming Languages, ACM, 1983.

    Google Scholar 

  13. Andrew C. Myers, Joseph A. Bank, and Barbara Liskov. Parameterized types for Java. In Symposium on Principles of Programming Languages, pages 132–145, ACM, 1997.

    Google Scholar 

  14. O. L. Madsen and B. Møller-Pedersen. Virtual classes: A powerful mechanism for object-oriented programming. In Object-Oriented Programming: Systems, Languages, and Applications, ACM, 1989.

    Google Scholar 

  15. O. L. Madsen, B. Møller-Pedersen, and K. Nygaard. Object-Oriented Programming in the Beta Programming Language. Addison-Wesley, 1993.

    Google Scholar 

  16. Martin Odersky and Philip Wadler. Pizza into Java: Translating theory into practice. In Symposium on Principles of Programming Languages, pages 146–159, ACM, 1997.

    Google Scholar 

  17. Martin Odersky and Philip Wadler. Leftover Curry and reheated Pizza: How functional programming nourishes software reuse. In IEEE Fifth International Conference on Software Reuse, Vancouver, BC, June 1998.

    Google Scholar 

  18. Jens Palsberg and Michael I. Schwartzbach. Object-Oriented Type Systems. Wiley, 1994.

    Google Scholar 

  19. Didier Rémy and JérÔme Vouillon. Objective ML: An effective object-oriented extension to ML. Theory and Practice of Object-Oriented Systems, 4(1): 27–50, 1998.

    Article  Google Scholar 

  20. J. C. Reynolds, Towards a theory of type structure. In B. Robinet, editor, Proc. Colloque sur la Programmation, LNCS 19, Springer-Verlag.

    Google Scholar 

  21. J. C. Reynolds, Types, abstraction, and parametric polymorphism. In R. E. A. Mason, editor, Information Processing 83, pp. 513–523. North-Holland, Amsterdam.

    Google Scholar 

  22. C. Strachey, Fundamental concepts in programming languages. Lecture notes for International Summer School in Computer Programming, Copenhagen, August 1967.

    Google Scholar 

  23. Kresten Krab Thorup. Genericity in Java with virtual types. In European Conference on Object-Oriented Programming, pages 444–471, LNCS 1241, Springer-Verlag, 1997.

    Google Scholar 

  24. Mads Torgersen. Virtual types are statically safe. 5th Workshop on Foundations of Object-Oriented Languages, January 1998.

    Google Scholar 

  25. Kresten Krab Thorup and Mads Torgersen. Structural virtual types. Informal session on types for Java, 5th Workshop on Foundations of Object-Oriented Languages, January 1998.

    Google Scholar 

Download references

Author information

Authors and Affiliations

Authors

Editor information

Eric Jul

Rights and permissions

Reprints and permissions

Copyright information

© 1998 Springer-Verlag Berlin Heidelberg

About this paper

Cite this paper

Bruce, K.B., Odersky, M., Wadler, P. (1998). A statically safe alternative to virtual types. In: Jul, E. (eds) ECOOP’98 — Object-Oriented Programming. ECOOP 1998. Lecture Notes in Computer Science, vol 1445. Springer, Berlin, Heidelberg. https://doi.org/10.1007/BFb0054106

Download citation

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

  • Published:

  • Publisher Name: Springer, Berlin, Heidelberg

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

  • Online ISBN: 978-3-540-69064-1

  • eBook Packages: Springer Book Archive

Publish with us

Policies and ethics