Milan Todorović

Create DSL (Domain Specific Language) on top of Swift

Did you know you can build your own programming language inside Swift? Learn how to create powerful DSLs for any domain using features like Result Builders.

Create DSL (Domain Specific Language) on top of Swift
#1about 2 minutes

Defining a Domain Specific Language (DSL)

A Domain Specific Language is a high-level programming language optimized to solve problems within a specific business domain.

#2about 2 minutes

Classifying internal vs external DSLs

DSLs can be classified as external (built from scratch with a new compiler) or internal (built on top of a host language like Swift).

#3about 3 minutes

Common examples and best practices for DSLs

Effective DSLs often use English-like syntax for clarity, with common examples including HTML, CSS, SQL, and various markup languages.

#4about 4 minutes

Analyzing SwiftUI as a powerful DSL in Swift

SwiftUI serves as a prime example of a DSL built on Swift, using structures for nouns and modifier methods for verbs to describe user interfaces declaratively.

#5about 4 minutes

Key Swift syntax features for building DSLs

Swift enables powerful DSL creation through key features like result builders, trailing closures, property wrappers, and modifier-style methods.

#6about 7 minutes

Live coding a simple drawing DSL in Xcode

This live coding session demonstrates how to build a simple drawing DSL from scratch using a result builder, protocols, and structures for custom commands.

#7about 4 minutes

Applying DSLs and leveraging the host environment

A DSL allows you to focus on the problem domain while leveraging the host environment's features like version control, debugging, and UI tools.

Related jobs
Jobs that call for the skills explored in this talk.
Name of

Name of

Remote
Intermediate
PHP
Java
+1

Featured Partners

Related Articles

View all articles
BB
Benedikt Bischof
How we Build The Software of Tomorrow
Welcome to this issue of the WeAreDevelopers Live Talk series. This article recaps an interesting talk by Thomas Dohmke who introduced us to the future of AI – coding.This is how Thomas describes himself:I am the CEO of GitHub and drive the company’s...
How we Build The Software of Tomorrow
Dev Digest 106 - DHH in HD
Alright, first things first: we have an exclusive interview with David Heinemeier Hansson of Ruby on Rails and Hey fame for you all, so you can line that one up in another tab! WeAreDevelopers CPO Thomas Pamminger met with David Heinemeier Hansson, C...
Dev Digest 106 - DHH in HD
DC
Daniel Cranney
10+ Free Tools Built on Top of the Bluesky API
Bluesky has been making waves recently, and the chances are you've heard the noise.Although it launched back in 2021, the platform saw a massive surge in popularity following the US presidential elections in November 2024, as millions of users withdr...
10+ Free Tools Built on Top of the Bluesky API

From learning to earning

Jobs that call for the skills explored in this talk.