DSL Implementation in MetaOCaml, Template Haskell, and C++ [chapter]

Krzysztof Czarnecki, John T. O'Donnell, Jörg Striegnitz, Walid Taha
2004 Lecture Notes in Computer Science  
A wide range of domain-specific languages (DSLs) has been implemented successfully by embedding them in general purpose languages. This paper reviews embedding, and summarizes how two alternative techniques-staged interpreters and templates-can be used to overcome the limitations of embedding. Both techniques involve a form of generative programming. The paper reviews and compares three programming languages that have special support for generative programming. Two of these languages (MetaOCaml
more » ... and Template Haskell) are research languages, while the third (C++) is already in wide industrial use. The paper identifies several dimensions that can serve as a basis for comparing generative languages.
doi:10.1007/978-3-540-25935-0_4 fatcat:r5jwb2iqkrcopc64273p5u6irq