🎉 Black Friday Sale! Save 30% when you subscribe today.
Result builders are a powerful feature of Swift that enable DSLs like SwiftUI using familiar syntax. We will explore what result builders have to say about parsing by getting an understanding of how they work before implementing a result builder layer over our parsing library.
Parsers currently use optionality to model failure. This makes parser definitions more awkward than they should be, and completely obscures where and why parsing failed. We can look to throwing functions for a solution to both these problems.