Walid Taha is a professor of computer science at Sweden's Halmstad University, and an expert on domain-specific languages. He recently talked with Dr. Dobb's editor in chief Jonathan Erickson.
Dr. Dobb's: What kind of applications are well-served by a DSL?
Taha: Applications that you can build using tools such as Excel, AutoCAD, and Simulink. All of these are great examples of DSLs, although we don't always think of them as such.
Dr. Dobb's: What's the most exotic DSL you've seen?
Taha: Blender.org is way cool. A lot of kids seem to be using it to build all kinds of beautiful games and other pieces of art.
Dr. Dobb's: Do developers need special skills to build and use DSLs?
Taha: Developers need knowledge of or the ability to understand the domain, and a good understanding of what it takes to define and implement a language for the particular group of domain experts at hand.
Dr. Dobb's: Five or 10 years from now, won't unique, nonstandard DSLs be difficult to maintain, once the original developer is no longer around?
Taha: This is a valid concern, but it shouldn't be a deterrent from using DSL. This is, fundamentally, an economic concern and should be addressed as such. That also means that there are many aspects of that question that should be considered. For example, if the domain is small enough, and the software isn't free (as in open source), then sure, the implementation may ultimately not be maintainable. On the other hand, if the domain is large enough, and the software is free, there should be enough commercial interest to maintain and evolve the DSL.
Dr. Dobb's: Have DSL productivity gains for developers been proved, or is this just another sales pitch?
Taha: I would say neither. I don't know where we would be without Excel, and I know that a lot of really simple tasks would take me and millions of others much longer. Even though studies demonstrating productivity gains are rare, that doesn't mean that [the gains] aren't very real. In many cases, one sees DSLs that clearly let users get done in a few hours what would have normally taken several months (e.g., tools for simulation of systems). When the difference is huge, it often seems like taking the time to do a controlled study is of purely academic interest.