Understanding Swift basics

Like any new programming language, Swift has its quirks. But as with most languages, the building blocks are pretty simple and straightforward. In this section, we're going to start with the features of Swift that nearly every programming language has, so that you can get a feel for how it works. If you've never used any programming language before then there may be some terms you are unfamiliar with, but I suggest you read through and look those up as you read along.

Before you start, open up a fresh playground and code along as you read!

Data types, constants, and variables

If you break down how software works to the lowest level of granularity, all that really ever happens is that data on your computer is written, manipulated, ...

Get Learning Xcode 8 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.