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.
- 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 ScholarDigital Library
- 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 ScholarDigital Library
- 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 ScholarDigital Library
- 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 ScholarDigital Library
- M. De Wael. Just-in-Time Data Structures. PhD thesis, Vrije Universiteit Brussel, Belgium, May 2016.Google Scholar
- 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 ScholarDigital Library
- 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 ScholarDigital Library
- 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 ScholarDigital Library
- M. Fowler. Refactoring: Improving the Design of Existing Code. Addison-Wesley, Boston, MA, USA, 1999. ISBN 0- 201-48567-2.Google Scholar
- 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 ScholarDigital Library
- ISBN 0-201-63361-2.Google Scholar
- 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 ScholarDigital Library
- 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 ScholarDigital Library
- 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 ScholarCross Ref
- R. Howard. The Eiffel Programming Language. Dr. Dobb’s Journal, 18(11):68–73, October 1993. ISSN 1044-789X. Google ScholarDigital Library
- 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 Scholar
- 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 ScholarDigital Library
- G. Kiczales and J. D. Rivieres. The Art of the Metaobject Protocol. MIT Press, Cambridge, MA, USA, 1991. ISBN 0262111586. Google ScholarDigital Library
- 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 ScholarDigital Library
- Y. Minsky, A. Madhavapeddy, and J. Hickey. Real World OCaml. O’Reilly Media, 2013. ISBN 978-1449323912.Google Scholar
- M. Odersky and Others. The Scala Language Specification. 2004.Google Scholar
- 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 ScholarDigital Library
- G. L. Steele, Jr. Common LISP: The Language (2Nd Ed.). Digital Press, Newton, MA, USA, 1990. ISBN 1-55558-041- 6. Google ScholarDigital Library
- 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 ScholarDigital Library
- V. Ureche, A. Biboudis, Y. Smaragdakis, and M. Odersky. Automating ad hoc data representation transformations. Technical report, EPFL, 2015.Google Scholar
- G. van Rossum. The Python Language Reference. Technical report, 1990-2015.Google Scholar
- 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 ScholarDigital Library
Index Terms
- Just-in-time inheritance: a dynamic and implicit multiple inheritance mechanism
Recommendations
Just-in-time inheritance: a dynamic and implicit multiple inheritance mechanism
DLS '16Multiple 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 ...
A typed intermediate language for compiling multiple inheritance
Proceedings of the 2007 POPL ConferenceType-preserving compilation can improve software reliability by generating code that can be verified independently of the compiler. Practical type preserving compilation does not exist for languages with multiple inheritance. This paper presents Emi, ...
A typed intermediate language for compiling multiple inheritance
POPL '07: Proceedings of the 34th annual ACM SIGPLAN-SIGACT symposium on Principles of programming languagesType-preserving compilation can improve software reliability by generating code that can be verified independently of the compiler. Practical type preserving compilation does not exist for languages with multiple inheritance. This paper presents Emi, ...
Comments