Slash Boxes
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

The Fine Print: The following comments are owned by whoever posted them. We are not responsible for them in any way.
More | Login | Reply
Loading... please wait.
  • It's not talking about programming in such a way that you have meaningful subroutine or method names.

    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.