Language constructs for context-oriented programming
Pascal Costanza, Robert Hirschfeld · 2005
ContextL is an extension to the Common Lisp Object System that allows for Context-oriented Programming. It provides means to associate partial class and method definitions with layers and to activate and deactivate such layers in the control flow of a running program. When a layer is activated, the partial definitions become part of the program until this layer is deactivated. This has the effect that the behavior of a program can be modified according to the context of its use without the need to mention such context dependencies in the affected base program. We illustrate these ideas by providing different UI views on the same object while, at the same time, keeping the conceptual simplicity of object-oriented programming that objects know by themselves how to behave, in our case how to display themselves. These seemingly contradictory goals can be achieved by separating class definitions into distinct layers instead of factoring out the display code into different classes.
Cited by 213 works. doi:10.1145/1146841.1146842
Authors
References
- A cookbook for using the model-view controller user interface paradigm in Smalltalk-80
- Self: The power of simplicity
- Design Patterns
- The art of the metaobject protocol
- Using prototypical objects to implement shared behavior in object-oriented systems
- The Art of the Metaobject Protocol
- Subject-oriented programming
- Common Lisp Object System specification
- Towards a new model of abstraction in software engineering
- Flavors: Message Passing in the Lisp Machine.