Embedding Extensible DSLs in Object-Oriented Languages
Weixin
Abstract
Functional languages are frequently chosen to implement embedded domain- specific languages (DSLs) whereas Object-Oriented languages are often used to implement stand-alone DSLs. We argue that OO languages are better host languages than FP languages in terms of implementing extensible embedded DSLs, which allow both new syntax and semantics to be easily added without touching existing code.
In this talk, we will first relate shallow embedding, a semantics-oriented way of DSL implementation in FP, to OO decomposition style. And then show how to extend a DSL with new syntax as well as semantics in an OO language. Also, some tricks will be shown for making the surface language fancier.