Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Does anyone know of a good reference for DSL design? [closed]

I've been looking into designing some Domain Specific Languages which I will probably implement in Clojure, but I really don't have any idea of what's involved.

The languages I have in mind are intended to be abstract languages that are readable by domain experts with little or no programming background.

Does anyone know of any tutorials, books, or other references that would be helpful?

like image 255
Doug Knesek Avatar asked Nov 17 '09 14:11

Doug Knesek


People also ask

What is DSL design?

A DSL is a language developed to address the need of a given domain. This domain can be a problem domain (e.g. insurance, healthcare, transportation) or a system aspect (e.g. data, presentation, business logic, workflow).

What is DSL example?

A good example of a DSL is HTML. It is a language for the web application domain. It can't be used for, say, number crunching, but it is clear how widely used HTML is on the web. A GPL creator does not know where the language might be used or the problems the user intends to solve with it.

How do you code DSL?

The DSL code is then transformed into programming language code by an automated code generator, or alternatively the program loads the domain-specific code and executes it. This first approach, with separated General Purpose Language (GPL) and DSL code is termed external DSLs.

How can DSLs are created?

DSLs can be implemented either by interpretation or code generation. Interpretation (reading in the DSL script and executing it at run time) is usually easiest, but code-generation is sometimes essential. Usually the generated code is itself a high level language, such as Java or C.


1 Answers

You might like Martin Fowler's nascent book Domain Specific Languages. It is a work in progress and much of it is available on line. It's intended to be language agnostic.

Below are some presentations from RubyConf that I've found useful (concepts at least should map to Clojure):

like image 89
Martin Carpenter Avatar answered Sep 20 '22 04:09

Martin Carpenter