Pluggable Controllers and Nano-Patterns in Java with Lola
Yossi Gil, Ori Marcovitch, Matteo Orru, and 1 more author
Advances in Science, Technology and Engineering Systems Journal Oct 2017
Pluggable controllers are a different way to design control constructors such as if, while, do, switch, and operators such as short circuit con-junction (&&) and the “?.” operator of the Swift programming language. Adoption of pluggable controllers enables the final user to modify and extend the control flow constructs (if, while, etc.) of an underlying programming language, the same way they can do if they implement functions such as printf and class String in a standard library. In modular, pluggable controller based language design, beside core control constructors, there are others, defined in standard libraries, with the purpose of augmenting and enriching the language. These pluggable controllers are extensible and replaceable. Being less intertwined in the main language, control constructor libraries can evolve independently from it, and their releases do not mandate new language releases. We illustrate the implementation of pluggable controllers using Lola, a powerful language-independent preprocessor and macro language. We demonstrate the introduction of new pluggable controllers with two case studies. The implementation of a Java stenography based on prevalent Java idioms, called “nano-patterns” or nanos, and the introduction in Java of new code constructs inspired by the Mathematica language’s commands.