NOTE: use Perl; is on undef hiatus. You can read content, but you can't post it. More info will be forthcoming forthcomingly.
All the Perl that's Practical to Extract and Report
Stories, comments, journals, and other submissions on use Perl; are Copyright 1998-2006, their respective owners.
What The Article Is Really Talking About (Score:1)
That's unfortunate. It should be.
When you write a DSL--a real DSL, with a parser and everything--you have the chance to choose your own syntax. That syntax can, and probably should, be appropriate to your domain. (You're writing a DSL because building a little language is the most appropriate way to solve domain problems, right?)
There's nothing wrong with that.
There's also nothing wrong with not writing a DSL. There's nothing wrong with writing a good API.
However, the concerns of writing a good API are different, in some ways, from the concerns of writing a good DSL. For one thing, you already have a pre-determined set of syntax you have to use. You have more constraints (at least unless you want to discuss LL or LALR, and I don't). I think the goals of each are different, too. With regard to an API, your goals should include clarity, correctness, and simplicity. The goals of writing a DSL include expressivity and succinctness, and perhaps learnability for domain experts who are not necessarily programmers.
Those goals are not always in alignment.
Reply to This