Leveraging Swift's Type System
One of the most remarkable qualities of Swift, compared to Objective-C, is its powerful type system. Swift developers have quickly accustomed themselves to the benefits of safer, more expressive APIs.
However, many of us don’t leverage the type system as much as we could. Types can help us eliminate duplicate code, build APIs that are easy to comprehend and even verify a significant portion of our program’s behavior.
This talk will explore how we can leverage the power of Swift’s type system in two broad categories:
1. Program Verification with Types, including a brief discussion on Types vs. Tests
2. Code Sharing with Types, via Protocols & Generics
We will discuss how these ideas can be applied in practice by including examples from a production app with a large code base.