Jordan Eldredge

Chord notation is a domain-specific language

|

In computer programming, a domain-specific language (DSL) is a tiny programming language or notation system which is purpose-built for a niche use case. These are generally far less capable than a so-called “general purpose” programming language, but trade that capability for being able to express intent at a higher level of abstraction within its domain. They tend to be “declarative”, meaning they describe what to do, rather than how to do it. Finally, they are often embedded within programs written in a more powerful general-purpose language.

Examples include, languages for expressing patterns of text (Regular Expressions), or languages for expressing data to be read from or written to a database (SQL).

It occurred to me that DSLs may exist outside of computer programming and so I looked to the other field where I have the most experience, music. Surprisingly there are a number of examples that likely qualify, but there is one example that clearly checks all the boxes: chord notation.

For example: C#m7b9

Chord notation has its own tiny grammar, is declarative and is generally embedded within a more general purpose language (notation system).

This makes me wonder which other disciplines have evolved DSLs, and what could we learn by looking at them as a multidisciplinary concept? Are there certain conditions which generally tend to lead to the development of a DSL? Are there properties that successful examples have in common?

Other possible examples in music