Swift is Apple’s modern programming language for iOS, iPadOS, macOS, watchOS, tvOS, and visionOS, and it also runs on Linux, Windows, and servers. Since its release in 2014, it has won developers over with clean syntax, strong safety guarantees, and great performance.

This guide walks through the language from the very first let to generics and opaque types. Go in order if you’re new; every section builds on the ones before it.

Article available Coming soon

1. Meet Swift

2. Variables and Data Types

3. Operators and Strings

4. Collections and Control Flow

5. Functions and Closures

Functions in Swift

Functions are the verbs of your code. Swift’s function syntax looks simple, but it’s carefully designed: argument labels make call sites read...

6. Building Your Own Types

Subscripts in Swift

Every time you write array[0], dictionary["key"], or string[index], you’re calling a subscript. Subscripts are a shortcut for accessing parts of a value,...

Inheritance in Swift

Inheritance lets one class build on another: a subclass gets its superclass’s properties and methods, can add new ones, and can override...

7. Lifetime, Safety, and Errors

Initialization in Swift

Swift has one non-negotiable rule about initialization: every stored property must have a value before an instance can be used. There’s no...

Error Handling in Swift

Things go wrong: files are missing, networks drop, users type nonsense. Swift handles recoverable errors with throw, try, and catch, a model...

8. Advanced Features

Protocols in Swift

A protocol describes what a type can do, without saying how. Classes, structs, and enums can all adopt protocols, which makes them...

Generics in Swift

Generics let you write code once and use it with many types, without giving up type safety. Array<Element>, Dictionary<Key, Value>, Optional<Wrapped>, and...

9. Under the Hood

These topics come up in day-to-day work, in debugging sessions, and very often in interviews:

defer in Swift

defer schedules a block of code to run when the current scope exits, no matter how it exits: a normal return, an...

Up next

Object-Oriented Programming

This guide grows with the blog: new articles are linked here as soon as they're published. Missing something? Let me know.

← Back to all roadmaps