DeepFJig - Modular composition of nested classes
Andrea Corradi, Marco Servetto, and Elena Zucca
Abstract
We present a new language design which smoothly
integrates modular composition and nesting of Java-like classes. That
is, inheritance has been replaced by an expressive set of composition
operators, inspired by Bracha's Jigsaw framework, and these operators
allow to manipulate (e.g., rename or duplicate) a nested class at any
level of depth. Typing is nominal as characteristic of Java-like
languages, so types are paths of the form outer^n.C_1. ... .C_k
which, depending on the class (node) where they occur, denote another
node in the nesting tree. However, paths denoting the same class are
not necessarily equivalent, since they can behave differently
w.r.t. composition operators.
The resulting language, called DeepFJig, obtains a great ex- pressive
power, allowing, e.g., to solve the expression problem, to encode the
main AOP mechanisms, and to bring some refactoring techniques at the
language level, while keeping a very simple se- mantics and type
system which represent a natural extension for, say, a Java
programmer.
Presented at FOOL'10; Sunday, 17 October
2010, Reno, Nevada, USA.