~/talk

Type-Driven Design with Swift

Talkat Swift Craft 2024 · 2024-05-21..05-24· [swift, software-architecture]
slides:none on file

Shows a concrete Swift pattern that turns runtime checks into compiler-enforced guarantees by modeling a login flow and a trip-tracker UI with domain types. Implements failable initializer wrappers for Email and Password, uses Result/enum for auth errors, marks SignedInUser as Decodable to prevent bogus construction, and replaces optional-laden User with a tagged union. Demonstrates a nonempty stops type and a parser-frontier for permissive inputs. Code examples use Swift, UIKit/SwiftUI and JSON decoding and succeed in making incorrect flows fail at compile time.

AI-written summary · about

  1. 0:00Introduction to type-driven design
  2. 1:20The fragility of traditional validation
  3. 6:19Compiler errors as safety guarantees
  4. 11:08The type-driven development cycle
  5. 15:54Parsing vs validation
  6. 20:26Refining types and domain modeling
  7. 25:15Advanced type modeling
  8. 30:44Managing data flow with types
  9. 35:01The lifecycle of type-driven phases
  10. 37:12Type safety in UI development
  11. 44:29Postel's Law and API design
  12. 50:00Conclusion and summary
~/search
type to search 6,249 conferences, 138,987 speakers and 185,172 talks
~/help
cmdctrl k
search every conference, speaker and series
/
focus the filter search
h
home
c
conferences
s
speakers
e
series
t
light / dark — the status bar button does the same
?
this help
esc
close this, then clear every filter — or just the search, while you are typing in it

Ignored while you are typing. Pages without a filter rail have no search to focus.