Functional vs. Dynamic DSLs: The Smackdown
- Posted: May 06, 2013 at 12:33 PM
- 877 Views
Right click “Save as…”
With the growing adoption of DSLs and DSL terminology into the mainstream has come a controversy over "external" (parser/AST/code-gen based) vs "internal" (hosted inside another programming language) DSLs. In this presentation, we take the approach that the complexity and power of an external DSL is hardly necessary for most DSL tasks, and that internal DSLs are the way to go. We discuss the difference between "compositional" and "computational" DSLs, a new way of thinking about constructing a DSL, and do so in the terms of two languages popularly used to host internal DSLs: Haskell (expressed mostly through F# code, owing to its functional nature) and Ruby (expressed mostly through Groovy code, owing to its dynamic nature).