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

Combining structural subtyping and external dispatch

Published:20 October 2007Publication History

ABSTRACT

By-name subtyping (or user-defined subtyping) and structural subtyping each have their own strengths and weaknesses. By-name subtyping allows programmers to explicitly express design intent, and, when types are associated with run time tags, enables run-time "type" tests and external/multimethod dispatch. On the other hand, structural subtyping is flexible and compositional, allowing unanticipated reuse. To date, nearly all object-oriented languages fully support only one subtyping paradigm or the other.

I propose a language that combines the key aspects of by-name and structural subtyping in a unified framework. The goal is to provide the flexibility of structural subtyping while still allowing static typechecking of external methods. The work offers a clean foundation for the designof future languages that enjoy the benefits of both by-name and structural subtyping.

I also propose a language extension to Java that combines by-name and structural subtyping, and includes parametric polymorphism. The practical utility of this language will be illustrated through case studies that show that code written in the new language is more flexible and easier to modify than the original code.

References

  1. Grzegorz Czajkowski, Laurent Dayn`es, and Ben Titzer. A multi-user virtual machine. In Proceedings of the General Track: 2003 USENIX Annual Technical Conference, pages 85--98, San Antonio, Texas, USA, June 2003. USENIX. Google ScholarGoogle ScholarDigital LibraryDigital Library
  2. Galen Hunt et al. An overview of the Singularity project. Microsoft Research Technical Report MSR-TR-2005-135 MSR-TR-2005-135, Microsoft Research, 2005.Google ScholarGoogle Scholar
  3. Georgios Gousios. Jikesnode: A Java operating system. Master's thesis, University of Manchester, September 2004.Google ScholarGoogle Scholar
  4. Matthew Hertz, Yi Feng, and Emery D. Berger. Garbage collection without paging. In PLDI '05: Proceedings of the 2005 ACM SIGPLAN conference on Programming language design and implementation, pages 143--153, New York, NY, USA, 2005. ACM Press. Google ScholarGoogle ScholarDigital LibraryDigital Library

Index Terms

  1. Combining structural subtyping and external dispatch

    Recommendations

    Comments

    Login options

    Check if you have access through your login credentials or your institution to get full access on this article.

    Sign in
    • Published in

      cover image ACM Conferences
      OOPSLA '07: Companion to the 22nd ACM SIGPLAN conference on Object-oriented programming systems and applications companion
      October 2007
      241 pages
      ISBN:9781595938657
      DOI:10.1145/1297846

      Copyright © 2007 ACM

      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]

      Publisher

      Association for Computing Machinery

      New York, NY, United States

      Publication History

      • Published: 20 October 2007

      Permissions

      Request permissions about this article.

      Request Permissions

      Check for updates

      Qualifiers

      • Article

      Upcoming Conference

    PDF Format

    View or Download as a PDF file.

    PDF

    eReader

    View online with eReader.

    eReader