How is a DSL (Domain Specific Language) different from an API (Application Programming Interface)?
Can someone point me to some examples?
People succeed in answering Adam Thorsen's questions 46% of the time (24 successes in 52 attempts).
Answers by: jer | Rich Collins
A Domain Specific Language is precisely that; a language built up around a specific problem domain. I.e., YACC/Bison (parser generators) are domain specific languages. I suppose you could look at a DSL as an extension of an API, giving it what amounts to syntactic sugar for various API calls.
Have you ever written a DSL? Did you find it useful?
Yes I have and I did find it useful; though a lot of the time I think people abuse DSLs, writing them when they're not required -- or just creating downright silly DSLs. But then, that's all personal opinion.