Domain‑Specific Languages

Section • 2 episodes • 44 min

“Domain-specific languages” allow us to capture more domain-specific problems using the features of another language, like Swift. We’ll explore just what that means, starting with a toy example to pave the way for building more real-world examples.

Related content

We explore a real-world application of domain-specific languages: HTML. We will see that HTML can be modeled in Swift using types and functions and we can leverage the entire language to improve the safety and ergonomics of writing plain ole HTML.

An HTML DSL
23 min

We compare domain-specific languages to a popular alternative: templating languages.

DSLs vs. Templating Languages
33 min