Reading 2 : Swift Reading
Table Of Contents
Swift Programming Language
Read the sections described below in the The Swift Programming Language: Language Guide. The goal of this reading is not to learn every aspect of Swift, but rather to learn the basics, become familiar with the documentation and where to find details of specific features, and to see lots of examples. To better emphasize important concepts, the sections in the reading have been annotated with three colors:
- Very Important : Read these carefully. They may more subtle than other parts but are important.
- Important : Read these carefully as well, but they should be easier to understand.
- Optional : Not required for now.
The Basics
- Type Aliases
- Tuples
- Error Handling
Basic Operators
- Comparison Operators
Strings and Characters
- Unicode Representations of Strings
Control Flow
- Conditional Statements
- Tuples
- Value Bindings
- Where
- Control Transfer Statements
- Continue
- Labeled Statements
- Checking API Availability
Functions
- Function Argument Labels and Parameter Names
- Variadic Parameters
- In-Out Parameters
- Function Types
Closures
- Closure Expressions
- Trailing Closures
- Capturing Values
- Closures Are Reference Type
- Escaping Closures Autoclosures
- Autoclosures
Enumerations
- Associated Values
Properties
- Computed Properties
Methods
- Instance Methods
- Assigning to self Within a Mutating Method
Subscripts
- Subscript Syntax
- Subscript Usage
- Subscript Options
Inheritance
- Overriding
- Overriding Properties
Initialization
- Class Inheritance and Initialization (lots here – appreciate and know where to find details.)
- Failable Initializers
- Required Initializers
- Setting a Default Property Value with a Closure or Function
Deinitialization
Optional Chaining
This chapter is optional but is a handy way to make your code more concise. If you are struggling with Optionals, you can wait to read this until next week.
Error Handling
Type Casting
Nested Types
- Nested Types in Action
- Referring to Nested Types
Extensions
- Extension Syntax
- Computed Properties
- Initializers
- Methods
- Subscripts
- Nested Types
Swift API Guidelines
Revisit the Swift API Design Guidelines.