Articles, podcasts and news about Swift development, by John Sundell.
An introduction to Swift’s type inference system, how it makes the syntax of the language so lightweight, and how to work around some of its limitations.
This week, let’s take a look at a technique that can let us leverage Swift’s type system to perform data validation at compile time — removing potential sources of ambiguity, and helping us preserve type safety throughout our code base — by using phantom types.
Harlan Haskins and Robert Widmann, who are both regular contributors to the Swift compiler, join John to take a deep dive into the internals of Swift, its type system, the compilation process and how they used LLVM to build their own programming language.