Swift is a relatively new programming language on the scene. While its primary use is for developing iOS and macOS apps, it can also be used in backend development or, as a scripting language. It incorporates modern features that provides it with a high expressive power, whereas maintaining safety. While Swift is an object-oriented language, it features characteristics such as high-order functions, value semantics, and protocols with associated types that make it very suitable for functional programming.
- Knowledge of at least one programming language.
- A computer with macOS and Xcode.
What you'll learn
- Variables and constants
- Primitive types: Numbers, Strings, Booleans.
- Compound types: Tuples, Arrays, Dictionaries, Sets, Ranges.
- Optional types.
- Conditional execution: if, guard, switch
- Loops: for, while, repeat-while.
- Defining and calling functions.
- Named and unnamed arguments
- Parameters: default values, variadic, in-out.
- Nested functions.
- Closures: trailing closures, escaping, autoclosures.
Value and reference semantics
- Enumerations, Structs and Classes.
- Initialization and deinitialization.
- Properties, computed, lazy and property observers.
- Instance and static methods.
- Visibility: public, internal, open, private, fileprivate, final.
- Inheritance and extension.
- Nested types.
- Representing errors
- Throwing and catching errors.
- Protocol requirements: required and optional.
- Protocol conformance and constraints.
- Protocol inheritance
- Generic functions
- Protocols with associated types.
- Generic types
- Automatic Reference Counting.
- Reference cycles.
- Modifiers: weak, unowned and strong.