Search code examples
terminologydsl

What is a domain specific language? Anybody using it? And in what way?


I guess I am looking for some kind of intro and see if anybody have used it. Are there any particular advantages of using it?

Wikipedia:

domain-specific language (DSL) is a programming language or specification language dedicated to a particular problem domain, a particular problem representation technique, and/or a particular solution technique.

Can anybody give any specific examples of how you have implemented it or how it can be useful in a given scenario?


Solution

  • A domain specific language is a language that's written to deal with a specific domain or set of concerns. There are a lot of them around, like make, ant, and rake for describing software builds, or lexx and yacc for language construction. In recent years, they've become popular as some things have combined to make them easier to build. Big among those things has been the increasing popularity of Ruby, which has several features that make it easy to build new DSLs.

    Martin Fowler is a big proponent of the idea, as here.