I am reflecting on how to present DSLs, for educational and marketing purposes.
The thing which obsesses me is that many persons have just no idea about what DSLs are, and perhaps we are doing a poor job explaining it.
I think that as a community we could benefit a lot if we learned how to communicate better what DSLs are.
So I would like to share my attempts and start a discussion over this. If I had to explain what they are about I would say that they are about:
making it possible for non-developers to do things that normally only developers can do.
Would you agree with that?
Expanding it a bit more we could say that:
The DSL allows the expert to explain their expertise via a DSL that gives feedback to them until the explanation is consistent and is executable. Then they click a button and a “program” is generated so that others in the office can use the generated “program”
I discussed that with persons in my newsletter and some very good points emerged. Here there are some:
A DSL is a notation for the language of the problem area (finance, mechanical engineering, retail inventory, whatever) and not in the language of programming computers. Therefore a person familiar with (and expert in?) the problem area can describe the program using his ordinary (though technical) language - nouns, verbs, adjectives - and expect them to mean the same things they do when he talks about the subject to his peers. And thus, the program he creates with the DSL will behave - and compute! - the way he expects it to.
Unlike, unrestricted natural language, the DSL will either reject ambiguous sentences or select a single standard default interpretation of them, ignoring any alternative meanings.
A DSL for me is: A language tailored for the user at the right level of abstraction and containing the key concepts to make it easy to express business problems and solutions in a given domain.
A DSL defines a common lingua in the same way as defined in Domain-Driven Design.
A DSL is a language designed to be used by someone who is a novice in programming but an expert in something else. A good DSL avoids details of how the computer will solve the problem. Instead, it concentrates on describing the problem using the terminology that the domain experts use when talking to each other. Designing a good DSL is quite hard because it requires a good understanding between the domain experts and the language designers. Once that is done, however, using the DSL is quite easy, at least for the domain experts.DSLs are a good idea because they bend the computer to fit the shape of the domain expert’s knowledge rather than the other way around.
What do you think?