views:

743

answers:

15

Hi,

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#

A: 

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
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.
LB
+1  A: 

Here is a question I had asked about DSLs written in Ruby: http://stackoverflow.com/questions/899665/ruby-dsl-domain-specific-language-repositories-examples

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

Demi
thanks i didn't see your question...
LB
A: 

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
+11  A: 

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
Beat me by 7 minutes... And, yeah, I'd say that regex is probably the most successful/widely-used DSL out there.
Dave Sherohman
VHDL is a good example.
LB
agreed, regex pwns pretty hard
Jason Watts
+6  A: 

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

plinth
+3  A: 

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
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
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.
Novelocrat
+2  A: 

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
Also, the shell itself: it's a dataflow language specific to the domain of file and process management.
Jörg W Mittag
indeed - I just felt that they were sufficient in and of themselves
ShuggyCoUk
A: 
  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
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
A: 

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
+6  A: 

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

Jeremy E
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
+1  A: 

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
+2  A: 

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
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
LB
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
A: 

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

David
A: 

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
A: 

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