Alex Rivera | Logout

Domain-specific languages vs. library of functions

Asked 2009-09-28T01:19:23.367
17

This may be subjective, I don't know: I have this problem, which I'm kind of equating to the "what language for this project?" question, since I can't seem to solve it.

I've been commisioned to write a book about a certain domain (let's say a very specific branch of physics) for a very technically savvy community, but who are not programmers. It is a book on this subset of algorithms that they use day in day out.

For this, given my audience, I've been toying with the idea of defining a DSL, instead of making them learn language X, and discuss the algorithms in this light, instead of in a given language or in pseudo-code.

The question is, then: what are some indications that what you need is a DSL rather than a library of functions to be called from a well-established, general-purpose language?

Thanks.

EDIT: Suggestions so far in favor of DSL:

  • Shield from general-purpose language complexity.
  • Make "programmer" more productive in his/her domain.
  • Make language concepts highly intuitive for newbies in programming. (Just thought of this now)
Edit
Report

1 Answer

3
  1. Your audience are non-programmers.
  2. You are targeting a specific field.
  3. They need to get job done.

I would choose a DSL over a general purpose language.

answered 2009-09-28T01:29:09.177

Your Answer