used when a value may be absent, replaces use of null $ exceptions; has a value or is nil
Back
Structs and Classes
Front
general-purpose, flexible constructs that become the building blocks of your program's code
Back
Dictionary
Front
unordered collections of key-value associations
Back
Array
Front
ordered collections of values
Back
Closures
Front
self-contained blocks of functionality that can be passed around and used in your code; function with no name
Back
Optionals
Front
handle the absence of a value
Back
Functions
Front
self-contained chunks of code that perform a specific task
Back
Dictionary Keys
Front
must be hashable (implement washable protocol); hashable types: int, float, double, strings, character, bool
Back
Var
Front
Variable; mutable data structure
Back
Extension
Front
adds new functionality to an existing class, structure, enumeration, or protocol type
Back
Tuple
Front
create and pass around groupings of values
Back
Let
Front
Constant; immutable data structure
Back
Protocol
Front
defines a blueprint of methods, properties, and other requirements that suit a particular task or piece of functionality
Back
Set
Front
unordered collection of unique values
Back
Value Types
Front
copied when assigned to a variable or constant, passed to a function, or returned from a function; safe with no side effects; small structures always copied, large structure copied when modified