The ‘Language’ in Domain-Specific Language Doesn’t Mean English (or French, or Japanese, or …)

This article has been in my “must blog about this” pile for a while now, so I decided to post it anyway.

I have encountered a problem several times in my career where people involved in software development simply assume that making something easier to understand is the same thing writing it in a natural language. As I have worked almost exclusively with English-speaking developers, that language has always been English, so I have worked with coding and configuration standards which jump through hoops to simulate English phrasing, but inevitably fall short.

What this approach misses in its naivety is the reason we work with programming languages at all: natural language is ambiguous and often wordy, adapted more for social bonding and collective storytelling than for precise descriptions of the interactions of abstract software entities.

Dave Thomas makes this point in the context of creating a DSL (domain specific language), but it is equally applicable to structuring and documenting any software. In many cases a concise and specific new term or grammar is far more useful and expressive than attempting to ape an existing natural language, once a small initial hump of unfamiliarity is surmounted.

PragDave: The ‘Language’ in Domain-Specific Language Doesn’t Mean English (or French, or Japanese, or …)

2 Comments

  1. > In many cases a concise and specific new
    > term or grammar is far more useful and
    > expressive than attempting to ape an
    > existing natural language

    I can’t fault that logic, but in many other cases
    (HTML?) it was a decent choice to base the
    language on real-world metaphors.

    As we try to populate an isolated
    patch of perfection in this badly broken
    world, many new terms and grammars are
    required as we build it up.

    Sadly, I have the strong impression that, as
    time goes by, we’ll find that our new terms
    and grammars will decay in front of our eyes,
    and we’ll always end up back on square one!

  2. Pingback: Simple Java DSL with fluent interface |

Comments are closed.