Thinking in Swift 3

Understanding the Patterns of Programming in Swift (One day)

Who it's for


This course is for programmers who know the fundamentals of the Swift Programming Language but haven't mastered the paradigms.

What you'll learn


This fast-paced workshop shows you how to take advantage of Swift features to write more robust code that is easier to reason about. Swift has been changing quickly over the past year. In this workshop you'll learn to embrace the latest Swift 3 conventions. The course covers material included in the final part of the book A Swift Kickstart.

Much of this day is focused on functions. We begin by examining the parameters passed to functions and how to maximize power and flexibility at the same time. We finish the day with a look at higher-order functions that produce and consume other functions and closures and discuss four canonical examples from the Swift Standard Library: map(), filter(), reduce(), and flatMap(). In between we explore sequences and iterators and guard against when things go wrong with our code.

We assume that you are an experienced programmer who has spent some time looking at Swift but you aren't yet an expert in Swift. You understand most of the hows and whats of working with Swift and are looking for the whys and wheres. This course is often part of a sequence that includes A Swift Kickstart (the course)

What you need


You need a Mac running El Capitan or Sierra with the latest version of Xcode 8 installed.

Booking Info


For information about booking this class for your group, company, or public event, contact booking@editorscut.com.

Syllabus


Flexible Functions

Understanding Parameters

Inout parameters

Closures

Generics

Extensions

Mutable Model

Non-Mutable Model

Sequences

Distributions

Raw Representables

while let/p>

Iterators

Sequences

Subscripts

When Things Go Wrong

Asserts

ErrorProtocol Structs

ErrorProtocol Enums

Throws

Try/Catch

Defer

Guard Let

Rethrow

Higher-Order Functions

Returning a Function

Returning a Closure

Consuming a Closure

Mapping Arrays

Classic Examples

Map

Filter

Reduce

FlatMap

Functors and Monads