We in the programming world seem to invent new DSLs everytime we touch the keyboard. Existing items aren't good enough or may be too wordy. DSLs give me cramps. I think in many cases they are over used and for the wrong reasons. Now that isn't to say that I don't think there is a need for them, when they are done for the right reasons. However, it seems that everybody's answer to a problem now is to create a DSL.
The problem with DSLs is that it's yet another language one has to learn to maintain software. My head is already cramped full of various utility languages and I'm sure it will be cramped with some more over time, but many of these languages don't provide the convience that they try to provide. Ask yourself before coming up with another language:
- Is there a currently supported standard that works?
- Can I extend this existing standard DSL?
- If not, why not?
- Will creating yet another DSL really solve the problem and make it easier to maintain going forward.
- XSLT - functional language used for transformations. Comes in two flavors XSLT 1.0 and XSLT 2.0. It itself is written using XML.
- XPath 1.0 and XPath 2.0 - A DSL for querying information from a XML Tree, usually a DOM.
- XML Schema - a DSL for describing XML Validation. Written using XML.
- RelaxNG - Another DSL for describing XML Validation and content. Comes in both an XML based syntax and a Human Readable Compact Syntax.
- XPointer - a XML DSL for specifying the location of information with a document.
- XInclude - a XML DSL for specifying how to include or import information into existing XML documents.
- Web Services - A whole family of DSLs describing how to create web service implementations.
- SchemaTron - Yet another XML Validation DSL for validating XML files.
Which brings me to XText. I've been experimenting with it for a couple of days, and like XML it provides great power at little upfront cost. However, I also think like XML it can run into being applied way to often just because it is easy to create and deploy. XText itself has it's own DSL for describing the languages, however, I wish it would have just leveraged an existing established standard language like the ISO EBNF.
So how many more DSLs will we create? More than we really need.




