skip to main content
article

Just-in-time inheritance: a dynamic and implicit multiple inheritance mechanism

Published:01 November 2016Publication History
Skip Abstract Section

Abstract

Multiple inheritance is often criticised for the ambiguity that arises when multiple parents want to pass on a feature with the same name to their offspring. A survey of programming languages reveals that no programming language has an inherently implicit and dynamic approach to resolve this ambiguity. This paper identifies just-in-time inheritance as the first implicit and dynamic inheritance mechanism. The key idea of just-in-time inheritance is that one of the parents is favoured over the others, which resolves the ambiguity, and that the favoured parent can change at runtime. However, just-in-time inheritance is not the silver bullet to solve all ambiguity problems heir to multiple inheritance, because it is not applicable in all scenarios. We conclude that the applicability of just-in-time inheritance is to be found in systems where multiple inheritance is used to model an ``is-a OR is-a''-relation, rather than the more traditional ``is-a AND is-a''-relation.

References

  1. K. Barrett, B. Cassels, P. Haahr, D. A. Moon, K. Playford, and P. T. Withington. A Monotonic Superclass Linearization for Dylan. In Proceedings of the Conference on Object-oriented Programming, Systems, Languages, and Applications, OOPSLA ’96, pages 69–82, 1996. Google ScholarGoogle ScholarDigital LibraryDigital Library
  2. C. F. Bolz, L. Diekmann, and L. Tratt. Storage Strategies for Collections in Dynamically Typed Languages. In Proceedings of the Conference on Object-oriented programming, systems, languages, and applications, OOPSLA ’13, pages 167–182, 2013. Google ScholarGoogle ScholarDigital LibraryDigital Library
  3. T. A. Cargill. The Evolution of C++. chapter The Case Against Multiple Inheritance in C++, pages 101–109. MIT Press, Cambridge, MA, USA, 1993. ISBN 0-262-73107-x. Google ScholarGoogle ScholarDigital LibraryDigital Library
  4. C. Chambers, D. Ungar, B.-W. Chang, and U. Hlzle. Parents are shared parts of objects: Inheritance and encapsulation in self. In LISP and Symbolic Computation, pages 207–222, 1991. Google ScholarGoogle ScholarDigital LibraryDigital Library
  5. M. De Wael. Just-in-Time Data Structures. PhD thesis, Vrije Universiteit Brussel, Belgium, May 2016.Google ScholarGoogle Scholar
  6. M. De Wael, S. Marr, J. De Koster, J. B. Sartor, and W. De Meuter. Just-in-time Data Structures. In Proceedings of the International Symposium on New Ideas, New Paradigms, and Reflections on Programming and Software, Onward! ’15, pages 61–75, 2015. Google ScholarGoogle ScholarDigital LibraryDigital Library
  7. S. Drossopoulou, F. Damiani, M. Dezani-Ciancaglini, and P. Giannini. More dynamic object reclassification: Fickle(ii). ACM Transactions on Programming Languages and Systems (TOPLAS), 24:153–191, 2002. Google ScholarGoogle ScholarDigital LibraryDigital Library
  8. M. A. Ellis and B. Stroustrup. The Annotated C++ Reference Manual. Addison-Wesley Longman Publishing Co., Inc., Boston, MA, USA, 1990. ISBN 0-201-51459-1. Google ScholarGoogle ScholarDigital LibraryDigital Library
  9. M. Fowler. Refactoring: Improving the Design of Existing Code. Addison-Wesley, Boston, MA, USA, 1999. ISBN 0- 201-48567-2.Google ScholarGoogle Scholar
  10. E. Gamma, R. Helm, R. Johnson, and J. Vlissides. Design Patterns: Elements of Reusable Object-oriented Software. Addison-Wesley Longman Publishing Co., Inc., 1995. Google ScholarGoogle ScholarDigital LibraryDigital Library
  11. ISBN 0-201-63361-2.Google ScholarGoogle Scholar
  12. A. Goldberg and D. Robson. Smalltalk-80: The Language and Its Implementation. Addison-Wesley Longman Publishing Co., Inc., Boston, MA, USA, 1983. ISBN 0-201-11371-6. Google ScholarGoogle ScholarDigital LibraryDigital Library
  13. J. Gosling, B. Joy, and G. L. Steele. The Java Language Specification. Addison-Wesley Longman Publishing Co., Inc., Boston, MA, USA, 1st edition, 1996. ISBN 0201634511. Google ScholarGoogle ScholarDigital LibraryDigital Library
  14. R. Hirschfeld, P. Costanza, and O. Nierstrasz. Context-Oriented Programming. Journal of Object Technology, March-April 2008, ETH Zurich, 7(3):125–151, 2008.Google ScholarGoogle ScholarCross RefCross Ref
  15. R. Howard. The Eiffel Programming Language. Dr. Dobb’s Journal, 18(11):68–73, October 1993. ISSN 1044-789X. Google ScholarGoogle ScholarDigital LibraryDigital Library
  16. T. Jones, M. Homer, J. Noble, and K. Bruce. Object Inheritance Without Classes. In Proceedings of the European Conference on Object-Oriented Programming, volume 56 of ECOOP ’16, pages 13:1–13:26. Schloss Dagstuhl–Leibniz-Zentrum fuer Informatik, 2016. ISBN 978-3-95977-014-9.Google ScholarGoogle Scholar
  17. C. Jung, S. Rus, B. P. Railing, N. Clark, and S. Pande. Brainy: Effective selection of data structures. In Proceedings of the Conference on Programming Language Design and Implementation, PLDI ’11, pages 86–97, 2011. Google ScholarGoogle ScholarDigital LibraryDigital Library
  18. G. Kiczales and J. D. Rivieres. The Art of the Metaobject Protocol. MIT Press, Cambridge, MA, USA, 1991. ISBN 0262111586. Google ScholarGoogle ScholarDigital LibraryDigital Library
  19. H. Lieberman, L. Stein, and D. Ungar. Treaty of Orlando. In Addendum to the Proceedings of the Conference on Object-Oriented programming, systems, languages, and applications, OOPSLA ’87, pages 43–44, 1987. Google ScholarGoogle ScholarDigital LibraryDigital Library
  20. Y. Minsky, A. Madhavapeddy, and J. Hickey. Real World OCaml. O’Reilly Media, 2013. ISBN 978-1449323912.Google ScholarGoogle Scholar
  21. M. Odersky and Others. The Scala Language Specification. 2004.Google ScholarGoogle Scholar
  22. O. Shacham, M. Vechev, and E. Yahav. Chameleon: Adaptive Selection of Collections. In Proceedings of the Conference on Programming Language Design and Implementation (PLDI) ’09, pages 408–418, 2009. Google ScholarGoogle ScholarDigital LibraryDigital Library
  23. G. L. Steele, Jr. Common LISP: The Language (2Nd Ed.). Digital Press, Newton, MA, USA, 1990. ISBN 1-55558-041- 6. Google ScholarGoogle ScholarDigital LibraryDigital Library
  24. J. Sunshine, K. Naden, S. Stork, J. Aldrich, and E. Tanter. First-class State Change in Plaid. In Proceedings of the Conference on Object-oriented Programming, Systems, Languages, and Applications, OOPSLA ’11, pages 713–732, 2011. Google ScholarGoogle ScholarDigital LibraryDigital Library
  25. V. Ureche, A. Biboudis, Y. Smaragdakis, and M. Odersky. Automating ad hoc data representation transformations. Technical report, EPFL, 2015.Google ScholarGoogle Scholar
  26. G. van Rossum. The Python Language Reference. Technical report, 1990-2015.Google ScholarGoogle Scholar
  27. G. H. Xu. Coco: Sound and adaptive replacement of java collections. In Proceedings of the European Conference on Object-Oriented Programming, ECOOP ’13, pages 1–26, 2013. Google ScholarGoogle ScholarDigital LibraryDigital Library

Index Terms

  1. Just-in-time inheritance: a dynamic and implicit multiple inheritance mechanism

      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

      Full Access

      • Published in

        cover image ACM SIGPLAN Notices
        ACM SIGPLAN Notices  Volume 52, Issue 2
        DLS '16
        February 2017
        131 pages
        ISSN:0362-1340
        EISSN:1558-1160
        DOI:10.1145/3093334
        Issue’s Table of Contents
        • cover image ACM Conferences
          DLS 2016: Proceedings of the 12th Symposium on Dynamic Languages
          November 2016
          131 pages
          ISBN:9781450344456
          DOI:10.1145/2989225

        Copyright © 2016 ACM

        Publisher

        Association for Computing Machinery

        New York, NY, United States

        Publication History

        • Published: 1 November 2016

        Check for updates

        Qualifiers

        • article
      • Article Metrics

        • Downloads (Last 12 months)9
        • Downloads (Last 6 weeks)1

        Other Metrics

      PDF Format

      View or Download as a PDF file.

      PDF

      eReader

      View online with eReader.

      eReader
      About Cookies On This Site

      We use cookies to ensure that we give you the best experience on our website.

      Learn more

      Got it!