ABSTRACT
I present the Ohmu language, a unified object model which allows a number of "advanced" techniques such as aspects, mixin layers, parametric polymorphism, and generative components to be implemented cleanly using two basic concepts: block structure and inheritance. I argue that conventional ways of defining classes and objects have created artificial distinctions which limit their expressiveness. The Ohmu model unifies functions, classes, instances, templates, and even aspects into a single construct - the structure. Function calls, instantiation, aspect-weaving, and inheritance are likewise unified into a single operation - the structure transformation. This simplification eliminates the distinction between classes and instances, and between compile-time and run-time code. Instead of being compiled, programs are reduced using partial evaluation, during which the interpreter is invoked at compile-time. Within this architecture, standard OO inheritance becomes a natural vehicle for creating meta-programs and automatic code generators - the key to a number of recent domain-driven programming methodologies.
- D. Batory, B. Lofaso, and Y. Smaragdakis, JTS: Tools for Implementing Domain-Specific Languages. 5th International Conference on Software Reuse, Victoria, Canada, June 1998.]] Google ScholarDigital Library
- Don Batory and Sean O'Malley. The Design and Implementation of Hierarchical Software Systems with Reusable Components. ACM Transactions on Software Engineering and Methodology, 1(4):355--398, October 1992.]] Google ScholarDigital Library
- L.M.J. Bergmans. Composing Concurrent Objects - Applying Composition Filters for the development and Reuse of Concurrent Object-Oriented Programs. Ph.D. Thesis, Department of Computer Science, University of Twente, The Netherlands, 1994.]]Google Scholar
- G. Bracha and W. Cook. Mixin-Based Inheritance. Joint ACM Conference on OOPSLA and ECOOP, 1990.]] Google ScholarDigital Library
- Gilad Bracha, Martin Odersky, David Stoutamire, and Philip Wadler. Making the Future Safe for the Past, Adding Genericity to the Java Programming Language. Proceedings of OOPSLA '98.]] Google ScholarDigital Library
- Guiseppe Castagna. Covariance and Contravariance: Conflict Without a Cause. ACM Transactions on Programming Languages and Systems, 1995.]] Google ScholarDigital Library
- Shigeru Chiba. A Meta-Object Protocol for C++. Proceedings of OOPSLA '95.]] Google ScholarDigital Library
- K. Czarnecki and U. Eisenecker. Generative Programming: Methods, Techniques, and Applications. Addison-Wesley, 2000.]] Google ScholarDigital Library
- M. Flatt, S. Krishnamurthi, and M. Felleisen. Classes and Mixins. ACM Symposium on Principles of Programming Languages, pages 171--183, 1998.]] Google ScholarDigital Library
- Erich Gamma, Richard Helm, Ralph Johnson, John Vlissides, Grady Booch. Design Patterns: Elements of Reusable Object-Oriented Software. Addison Wesley, Mass. 1995.]] Google ScholarDigital Library
- Atsushi Igarashi and Benjamin Pierce. Foundations for virtual types. Technical report, University of Pennsylvania, 1998.]]Google Scholar
- Neil Jones, Carsten Gomard, and Peter Sestoft. Partial Evaluation and Automatic Program Generation. Prentice Hall, 1993.]] Google ScholarDigital Library
- G. Kiczales, E. Hilsdale, J. Hugunin, M. Kersten, J. Palm, and W. G. Griswold. An overview of AspectJ. Proceedings of ECOOP, 2001.]] Google ScholarDigital Library
- G. Kiczales, J. des Rivieres, and D. G. Bobrow. The Art of the Metaobject Protocol. The MIT Press, Cambridge, MA, 1991.]] Google ScholarDigital Library
- O.L. Madsen and B. Muller-Pedersen. Virtual classes: A powerful mechanism in object-oriented programming. Proceedings of OOPSLA '89.]] Google ScholarDigital Library
- Gail Murphy and David Notkin. The Interaction Between Static Typing and Frameworks. Technical Report TR-93-09-02, University of Washington, 1993. See also: The Use of Static Typing to Support Operations on Frameworks. Object-Oriented Systems 3, 1996, pp. 197--213.]]Google Scholar
- Klaus Ostermann. Dynamically composable collaborations with delegation layers. Proceedings of ECOOP 2002.]] Google ScholarDigital Library
- C. Simonyi, .The Death of Computer Languages, the Birth of Intentional Programming. NATO Science Committee Conference, 1995.]]Google Scholar
- Yannis Smaragdakis and Don Batory. Implementing Layered Designs with Mixin Layers. Proceedings of ECOOP, 1998.]] Google ScholarDigital Library
- K. K. Thorup and M. Torgersen. Unifying Genericity - Combining the Benefits of Virtual Types and Parameterized Classes. Proceedings of ECOOP, 1999.]] Google ScholarDigital Library
- David Ungar and Randall B. Smith. Self, The Power of Simplicity. Proceedings of OOPSLA 1987]] Google ScholarDigital Library
- T.L Veldhuizen. Arrays in Blitz++. Proceedings of the 2nd International Scientific Computing in Object Oriented Parallel Environments (ISCOPE'98). See also http://www.oonumerics.org/blitz.]] Google ScholarDigital Library
Index Terms
- The power of symmetry: unifying inheritance and generative programming
Recommendations
Eliminating distinctions of class: using prototypes to model virtual classes
OOPSLA '06: Proceedings of the 21st annual ACM SIGPLAN conference on Object-oriented programming systems, languages, and applicationsIn mainstream OO languages, inheritance can be used to add new methods, or to override existing methods. Virtual classes and feature oriented programming are techniques which extend the mechanism of inheritance so that it is possible to refine nested ...
Eliminating distinctions of class: using prototypes to model virtual classes
Proceedings of the 2006 OOPSLA ConferenceIn mainstream OO languages, inheritance can be used to add new methods, or to override existing methods. Virtual classes and feature oriented programming are techniques which extend the mechanism of inheritance so that it is possible to refine nested ...
Typed parametric polymorphism for aspects
Special issue: Foundations of aspect-oriented programmingWe study the incorporation of generic types in aspect languages. Since advice acts like method update, such a study has to accommodate the subtleties of the interaction of classes, polymorphism and aspects. Indeed, simple examples demonstrate that ...
Comments