<XML><RECORDS><RECORD><REFERENCE_TYPE>7</REFERENCE_TYPE><REFNUM>7523</REFNUM><AUTHORS><AUTHOR>Czarnecki,K.</AUTHOR><AUTHOR>O'Donnell,J.T.</AUTHOR><AUTHOR>Striegnitz,J.</AUTHOR><AUTHOR>Taha,W.</AUTHOR></AUTHORS><YEAR>2004</YEAR><TITLE>DSL Implementation in MetaOCaml, Template Haskell, and C++</TITLE><PLACE_PUBLISHED> LNCS 3016 </PLACE_PUBLISHED><PUBLISHER>Springer Verlag</PUBLISHER><LABEL>Czarnecki:2004:7523</LABEL><KEYWORDS><KEYWORD>Domain specific language</KEYWORD></KEYWORDS<ABSTRACT>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 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. </ABSTRACT></RECORD></RECORDS></XML>