Tuesday, 22 April 2008

PSL not DSL

I've long felt that the DSL moniker is a little inappropriate for some (perhaps most) applications of the ideas behind it. The majority of 'DSLs' are really just little languages which help solve specific problems in the software development space, e.g. Rake, which provides a very nice language for expressing graphs of dependent tasks.  Martin Fowler has written quite a lot on the subject of DSLs - this paper is a good example of a little language being described as a DSL.

So it was good to hear Jim Weirich (the creator of Rake) make this very point while talking about the DSL hype in this InfoQ interview. The relevant bit is something like 14 minutes in. I like the term Problem Specific Language (PSL), which Jim invents here.

I'm working on applying Ruby to modelling (and reasoning about) a real domain, and driving a tool-chain for forward-engineering artifacts from the Ruby description. Apart from Rake, I'm also looking at RSpec, which uses Ruby syntax to capture descriptions of system behaviour. I'm very keen to work on the 'real DSL' problem, looking for the sweet-spot where domain-driven design and programming overlap. This whole area seems very fruitful for Ruby, because the language allows us to create very rich and expressive scripts which not only read quite naturally, but can also control complex processes.

No comments:

Post a Comment