Domain specific languages allow us to create an ideal environment for solving a specific problem. In this talk we’ll discuss how to use various language features like recursive enums, trailing closures and higher order functions to create elegant and type-safe domain specific languages. We will go through real-world problems we encountered at Pinterest and the domain specific languages we wrote to solve them.