Lessons in Swift Error Handling and Resilience
summary
Explains concrete patterns: distinguish explicit vs implicit input and model temporal state to avoid init-order bugs (example: theme subsystem initialized before migration caused defaults to revert). Recommends encoding prerequisites in types (create a SetupComplete value so code won’t compile when misordered). Advises when to use Optional vs Error: switch a struct from failable init -> throws for chat ID parsing so callers get contextual errors via do/catch and error monitoring; mentions Result for limited use.
AI-written summary · about
chapters (5)
related talks
37mStraying From the Happy Path: Taking Control of Errors in Swift
30mLeveraging Swift's Type System
34mStraying From the Happy Path: Taking Control of Errors in Swift
40mLeveraging Swift’s Type System
48mLearning From Our Elders: Applying functional insights without losing Swift
55mEmerging Best Practices
20mHow Not to Write Swift
52mType-Driven Design with Swift
