Understanding the Paradigms of Programming in Swift (One day)
This course is for programmers who know the fundamentals of the Swift Programming Language but haven't mastered the paradigms.
Contact us at inquiries@dimsumthinking.com to book or inquire about this course for your group, company, conference, or public event.
Much of this fast-paced workshop 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.
You need a Mac running Sierra or High Sierra with the latest version of Xcode.
Flexible Functions
Understanding Parameters
Inout parameters
Closures
Generics
Extensions
Mutable Model
Non-Mutable Model
Sequences
Distributions
Raw Representables
while let
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