Languages built with singular purpose — more expressive than libraries, more constrained than general-purpose tongues. Explore their history, power, and future.
"A computer programming language of limited expressiveness focused on a particular domain." — Martin Fowler, Domain-Specific Languages, 2010
Unlike general-purpose languages (GPLs) such as Python or Java — designed to solve any problem — a DSL is purpose-built. It speaks the vocabulary of a specific problem domain: a database engineer thinks in SQL, a web designer reaches for CSS, a build engineer writes Makefiles. The language is the domain.
DSLs trade generality for expressiveness within their domain. A few lines of SQL can express a data transformation that would require hundreds of lines in a general purpose language. That cognitive density is their superpower.
External DSLs have their own syntax and parser (SQL, CSS, Regex).
Internal DSLs are fluent interfaces embedded in a host language
(Rails routes in Ruby, Gradle in Kotlin).