Home → Speaker Bio

Rob Napier


@cocoaphony

Rob is co-author of iOS Programming Pushing the Limits, and has a passion for the fiddly bits below the surface, like networking, performance, security, and text layout. He asks "but is it good Swift?" a lot. Someday he hopes to know.

Rob's Talk on Day 1 - 10:35 a.m. - 11:10 a.m.

To be! Or not? Optionals in practice

Optionals are one of the most powerful features in Swift, and also one of the most confusing. If you’ve spent any time working in Swift, you’ve probably grown used to scattering ? and ! as needed, but are your comfortable with what they really mean? When should you use an explicit Optional, and when should you use an implicitly-unwrapped one? When should you use if-let and when should you force-unwrap? How do Optionals interact with default values? Which Optionals are “Swifty” and which exist just to make Objective-C happy?

This session will explore all of that and teach you what it means to be “Optional” and how this powerful tool can simplify your code and clarify your thinking.