1. Getting Your Feet Wet

Swift was released in 2014, but its development started four years earlier. Chris Lattner, the original author of the LLVM compiler and the director of Apple’s Developer Tools Department, has worked for Apple since 2005. He had to develop Swift in secret for several years and was, amazingly, able to keep it under wraps until its release in June 2014.

This chapter covers the basic building blocks of Swift. It starts with variables and constants, which allow you to reference a storage location by name. With this knowledge, you will be able to store stuff in memory. Swift has a special feature called optionals, which allow you to check for the presence of a value (by determining whether the variable or constant is nil). ...

Get Learning Swift™ Programming now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.