1 2 3 4 5 6 7 | |
The mb-sound synthesizer DSL
Hey everyone! In this post I want to talk about a long-standing idea in software engineering for making development easier, called domain-specific languages, or DSLs. The term DSL can apply to diagramming layouts, document markup formats, and more, but I want to focus specifically on domain-specific programming languages. In that context, a DSL is a programming language specifically designed for a single purpose or “domain,” like writing web servers, processing audio, creating machine learning pipelines, etc. DSLs are, in my view, the ultimate form of abstraction and expressiveness.
Consider this: when you’re hungry, do you ask for “a saucer-shaped flatbread of roughly 16 inches in diameter, coated with sauce, topped with meat and cheese,” or do you order “a large pizza?” This is how much of a difference there can be between classical approaches to coding and domain-specific languages.
Here’s an example borrowed from later in the article to give you a sneak peek at the advantage a domain-specific language can provide:
DSL
1 2 3 | |
Object-oriented
1 2 3 4 5 6 7 8 9 | |
Read on to learn more about domain-specific languages, see how I used Ruby to implement a domain-specific language for audio processing, and compare some real-world DSLs to more traditional programming approaches. My goal is to show you the power of language, abstraction, and Ruby, and if you’re a programmer, convince you to try using and making domain-specific languages yourself.




