~/talk

How to Write Resilient Swift code (and do it faster with Macros)

Talkat iOS Conf SG 2026 · 2026-01-21..01-23· [typescript, software-architecture]
links:none on file
slides:none on file

Team Cook demo shows enums from APIs break when a backend adds a case; solution is an enum with unsupported(String) that preserves unknown values and makes switches exhaustive, plus a proxy server in TypeScript to backfill third‑party APIs. Custom Swift Macros generate the verbose raw‑representable/codable boilerplate (e.g. safe enum, non-empty string decoder, branded id) at compile time, speeding adoption but requiring care: a bad macro expansion can compile yet crash at runtime.

AI-written summary · about

  1. 0:00Introduction
  2. 1:02Resilient Swift code matters
  3. 3:13Enum inconsistencies
  4. 6:27Resilient enum decoding
  5. 12:30Avoid enums for external values
  6. 14:59Manual enum fixes
  7. 15:23Swift macros introduction
  8. 17:52Swift macro implementation
  9. 20:23Macro expansion demo
  10. 21:48Testing Swift macros
  11. 22:32Swift macros in 2024
  12. 23:15Code safety philosophy
  13. 24:20Branded types
  14. 27:37Branded IDs and type safety
  15. 29:21Units for clarity
  16. 30:01Codable edge cases
  17. 32:11Macro safety
  18. 34:47Summary
~/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.