2005.01.13

Thoughts on DSLs

There has been a lot of buzz about DSLs lately, and for the most part, I think this is a good thing. Jean Jacque DuBray points to Keith Short's presentation, which gives a good introduction to DSLs and their role in managing complexity. Microsoft is obviously investing quite a bit in DSLs both from a marketing point of view and a tools point of view.

Like every other technical TLA that is being memed through our neurons (SOA, MDA, UML, XML, ...), DSLs are like a love relationship. Texas accent: "DSLs might clean up real pretty-liketo make a good impression, but you sleep over enough, and they gonna let their hair down a notch." (sic)

In my experience, composing applications out of lots of little languages has led to one of two inevitabilities, both of which have to do with the translation factor. Either you have to learn to translate between each language directly, or you need to translate each language to a shared language, or possibly both.

Examples of translations that you may use regularly include

ASP.NET (CLI-complaint languages -> [X]HTML)

ADO.NET (CLI-complaint languages -> SQL)

Object/Relational mapping techniques

System.Xml.Serialization (CLI-compliant languages->XML)

Examples of shared languages that you may (or may not) use regularly

CLI

XML and friends

byte streams, e.g. *Nix-style pipe & filters

lisp

Translating between these little languages is a nontrivial undertaking. Arthur C. Clarke's warning necessarily applies: "Any sufficiently advanced technology is indistinguishable from magic." A DSL platform like MS and others are trying to build had better be magic. I wonder [out loud] whether the graphical emphasis is critical at this point in our experience with the concepts. My experience in adult education/communication leads me to believe so. But I doubt we are fully ready -- my experience in dealing with algorithms, debugging, and the like leaves me skeptical.

We as an industry are marching on to new and, we are hopeful, better things. I am not saying that it is not a worthy direction --LISP apparently has understood the value of DSLs for years [and years]. I am skeptical about how well we collectively will be able to leverage these new tools. I hope I am wrong. And in the meantime, there is a lot of opportunity :)