Cocoaphony

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.

Date Conference Video Notes
2017-10-19 iOS Conf SG, 2017 link