The Complete Guide to Understanding Swift Optionals – Download

Download: The Complete Guide to Understanding Swift Optionals

The Complete Guide to Understanding Swift Optionals - Cover

Swift optionals seem to cause problems to many people, but my experience shows me that the problem just originates from a lack of understanding. This manifests in two ways. The first is not understanding what optionals are or what they are needed for. The second one is how they actually work and what the various operators mean. This can be sometimes caused by trying to translate the concept of nil values from other languages. This fails, because nil values in other languages and optionals in Swift are two different concepts, although they both use nil values as sentinels.

This guide is meant to close these gaps. The whole guide should take less than one hour to read in one sitting, but it can be read in pieces if you desire so. The chapters are in a logical order, starting from the basics and going into more advanced concepts.

In the first chapters we go over what optionals mean, what they are needed for and how to use them. Readying the first few chapters of this guide should already give you a good understanding of optionals and solve many problems you have.

The guide then focuses on how to use optionals in different places and different optional techniques and patterns that often appear in Swift. The last chapter is dedicated to more advanced techniques. These last ones are not necessary for your understanding and can be skipped. But knowing them is going to simplify your code in some places.


Click here to download the PDF file


Help me create even more great free material

It takes me a lot of time to produce my free material, but it is my pleasure to give it to you as a gift. If you know someone else that might benefit from this guide, take a moment to share it clicking on the buttons below. The more people I can reach, the more time I can dedicate to produce even more high quality free material for you. Thank you.