11

I'm interested in Domain Specific Languagess design and implementation. Much of the DSLs that I know stem from the academic world.

Can you give me some pointers to DSLs that are actually used in the industry ? and that you use on a daily-basis...which are really convenient..

(I'm interested in declarative languages too, but not really xml-based ones...)...

I'd like to establish a (non-exhaustive) list of industry-deployed languages...i know this is huge...

Sometimes, I'm implementing using a General Purpose Language things that could be trivially done using a DSL.

EDIT I'm mainly interested in application-directed DSLs, not small-embedded languages. For instance, SQL matches what I'm looking for but SQL embedded in java does not interest me. Another example of the kind of language i'm looking for is X#

Bill the Lizard
  • 398,270
  • 210
  • 566
  • 880
LB40
  • 12,041
  • 17
  • 72
  • 107

16 Answers16

14

A DSL that's so succesful that it got its own SO tag is the regex language. Specific to the domain of string pattern matching, of course.

Another popular one, but with which I have no experience is VHDL. VHDLs popularity stems from the fact that it's easily converted for use in an FPGA.

[edit] While it's certainly not Turing complete, C's printf() format specifier can be considered as another domain-specific language.

MSalters
  • 173,980
  • 10
  • 155
  • 350
11

NMake, MSBuild, lex, yacc, bison, flex, TeX, PostScript, XAML, SSIS, Wix

Jeremy E
  • 3,704
  • 2
  • 28
  • 46
  • 9
    make, sh, cmd.exe, HTML, CSS, PHP (originally), Perl (originally), Regexp, LINQ, SQL, XQuery, XPath, XSLT, XML Schema, DTD, JavaDoc. Also, the constraint language used in .NET generics (as well as the one in Java). Excel, arguably. Excel macros definitely. Heck, even C: it's a domain specific language for writing Unix kernels on DEC PDP machines. (Some people unfortunately mistook it for a general purpose language, though ...) The list goes on and on and on – Jörg W Mittag Jun 18 '09 at 21:32
6

EBNF is probably the most widely-used domain specific language within its domain - a language to describe languages.

plinth
  • 48,267
  • 11
  • 78
  • 120
3

Wikipedia suggests that spreadsheet formulas and shell scripts are both domain specific languages. This would make them probably the most wide spread examples.

Colin Pickard
  • 45,724
  • 13
  • 98
  • 148
  • 1
    Interesting.. I like how in excel you have to use basically functional like notation: if(not(and(isblank(A$1),isblank(B$2)))) – Ape-inago Jun 18 '09 at 20:55
  • 1
    Spreadsheet formulas I'm with you (and Wikipedia) 100%. I'd disagree on shell scripts - they're essentially a general purpose language, in that they're pretty trivially capable of anything. – Phil Miller Jun 25 '10 at 15:01
  • I disagree on shell scripts not being DSLs. Some of them are Turing complete, but they are still specific to the domain of chaining program execution in a meaningful way. Bash is a prime example. It doesn't even have arithmetic, it calls other tools (test, expr) to do very basic stuff – M.Stramm Mar 15 '13 at 11:19
2

Awk provides is a domain specific language for the processing of semi structured textual data.
Many of the more powerful unix command line tools in wide spread use such as find and grep could be classed as having a domain specific language (even when limited solely to command line arguments)

ShuggyCoUk
  • 36,004
  • 6
  • 77
  • 101
2

I don't know if you want to consider graphical DSLs as well. I'd include

  • NORMA, a DSL for conceptual domain modeling, based on Object-Role Modeling notation (ORM2)
  • Web Service Software Factory, which uses three DSLs to model web services

Both of the above were created using the DSL Toolkit.

John Saunders
  • 160,644
  • 26
  • 247
  • 397
  • I should look again at DSL tools...Didn't look at it since J.M. Prieur gave a demo when I was doing my Ph.D. That seems to be really mature now – LB40 Jul 10 '09 at 15:01
  • Extremely mature. The 2010 beta 1 version even has technology to allow models to reference each other. See three short videos at http://code.msdn.microsoft.com/DslTools. Also if you haven't looked since 2005 versions, 2008 version solved ugliness with entering paths. You get good Intellisense now. – John Saunders Jul 10 '09 at 15:05
1

Here is a question I had asked about DSLs written in Ruby: Ruby DSL (Domain Specific Language) repositories, examples

Aside from Ruby DSLs, SQL is a fine example of a very popular DSL, as is AWK.

Community
  • 1
  • 1
Demi
  • 6,147
  • 7
  • 36
  • 38
1

MEL (Maya Expression Language) is a command line-esque language that AutoDesk Maya uses throughout its entire design. The Maya Ascii file format that scenes can be saved in uses MEL to compose its scenes. The user interface is largely built and controlled using MEL scripts. The expressions you can use to drive channels and attributes on objects are MEL.

I suppose it could technically be considered an embedded language in cases where you're just writing scripts for it. However, without MEL, Maya basically wouldn't exist. No ascii file format, no user interface, etc.

Soviut
  • 88,194
  • 49
  • 192
  • 260
0

You can write a domain specific language in languages like Boo, but I think the very definition of domain specific indicates that most of the time it will be in a specific industry or even just a single company...

Wikipedia has a good introductory article on this.

This overview has an examples section with some good links.

John Weldon
  • 39,849
  • 11
  • 94
  • 127
  • I agree... Implementing a DSL is not something that hard, but the problem is how to target the right community and answer their questions, the right way. – LB40 Jun 18 '09 at 14:23
0

There are parts of ruby on rails that can be considered domain-specific languages. In particular its language for specifying relational tables.

Kathy Van Stone
  • 25,531
  • 3
  • 32
  • 40
0
  1. Mak Stealth's language for programming charcter behaviors (Do not think it has a name)
  2. Slang - Goldman Sachs language (I've heard of it but never used it)
  3. CMS-2 Navy programming language
Nick
  • 3,217
  • 5
  • 30
  • 42
  • CMS-2 isn't domain specific. Its just an early version of a langauge for embedded programming, like C. Unless you think C is a domain-specific langauge. – Ira Baxter Sep 01 '09 at 23:38
0

Google's web search supports some increasingly sophisticated parametrization

You could argue that this is one of the most widely used DSL's if even a small fraction of their userbase ever uses one of them as opposed to the standard list of words.

ShuggyCoUk
  • 36,004
  • 6
  • 77
  • 101
0

Erlang was originally a telecom-specific language, although it is now (occasionally) used as a general-purpose language.

David
  • 3,177
  • 1
  • 18
  • 15
0

The two (not already mentionned) which have impressed me most are:

I'm a big fan of declarative DSLs. Operational DSLs (like Maple, Mathematica and R are nice too, but not that different from conventional langauges).

Jacques Carette
  • 3,052
  • 1
  • 22
  • 28
0

Tcl is a language that was originally designed to be a framework for building DSLs — providing basic functionality like programmability and I/O while the domain-specific parts were created fresh for each application — and which grew up into a generic scripting language. One of the more widely known Tcl-based DSLs is Expect.

Donal Fellows
  • 133,037
  • 18
  • 149
  • 215
0

For business processes we have e.g.

  • BPEL which is expressed in XML and is executable
  • BPMN which is a visual language and is used for modeling
Volvic
  • 81
  • 6