Leveraging Swift's Type System

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 three broad categories:

1. Code Sharing with Types, via Protocols & Generics
2. Program Verification with Types, including a brief discussion on Types vs. Tests
3. Type First Development

We will discuss how these ideas can be applied in practice by including examples from production apps with large code bases.
Throughout the talk we will also discuss concepts from languages with other type systems and see how they apply to Swift.
Hopefully this talk will inspire the audience to unleash the superpowers of types in their own programs.


Benjamin Encz

August 24, 2016