Well, I figured I may as well make the first post in my PH blog vaguely controversial. If the title's not enough for you, then let me go on to suggest that the Bible has some useful advice in it for those of us trying to decode the continual stream of acronyms that the computing industry likes to throw at us.
"What has been will be again,
what has been done will be done again;
there is nothing new under the sun."
-- Ecclesiastes 1:9
One of the things that amuses me most about the computing industry is how we seem to keep getting shiny new names for the same old technologies, perhaps just applied in a different problem domain or using a different language.
I have a computer science background, and one of my classes was on the subject of Distributed Systems. Shortly after taking this class, I decided it was high time I found out what on earth this AJAX thing everybody was going on about really was. And I came away saying, "OK, so we use JavaScript to make method invocations on an object that in turn makes a request to a server, which then responds to that request and then we use what is sent back to make changes to the page through some other set of objects...what's the new technology here?" And the answer is: there's not really much in the way of new technology. It's the same old client/server request stuff that got branded Web Services a while back, coupled with what we were doing without the client/server stuff and calling DHTML (Dynamic HTML) years ago.
Don't get me wrong here. I'm not saying that web services or AJAX are bad things. I have seen both used powerfully, and use web services to good effect myself. But in terms of the technology, they are nothing revolutionary. It's just a combination of formats and languages applied to a specific problem domain.
With all that in mind, I've spent some time trying to work out what the deal is with DSLs. DSL is short for Domain Specific Language. This is a (formal) language of some kind that is suited to a very specific task. For example, MathML is a domain specific language suitable for describing mathematical formulas. DSLs break down into Internal DSLs and External DSLs. Internal DSLs are just subsets of an existing more general purpose language, whereas External DSLs are languages of their own.
The advantage of an internal DSL is that you do not need to write your own parser for it, and you can use any of the features of the general purpose programming language amongst the domain specific bits. The advantage of an external one is that you are creating a language all of your own and have all the freedom associated with doing so. The advantages of one approach are the disadvantages of the other.
I see a lot of people talking about Internal DSLs in the Perl and Ruby camps, often with one side saying language X is better at it and the other pointing out that you can do the same kind of thing in language Y. The thing is, the more I look at the examples from both sides, the more I am left thinking: if it's an internal DSL, you are just using the syntax provided by the programming language, and therefore how is creating an internal DSL any different to just defining a nice interface to the module/package/whatever that you are working on?
Nice interfaces to modules and good API design are both of great importance. They make libraries and frameworks easier to learn and use by new programmers, and make the code more clear to those who are maintaining it. So if the whole DSL thing has just got people asking, "how can we use (or abuse) the syntax of our programming language to create a good interface to our module", I welcome it. But I'm failing to see anything new.