~/talk

Swift Sync and Async Error Handling

Talkat iOS Conference SG 2015 · on Sunday, 2015-10-25· [ios, software-architecture]
slides:none on file

Shows that untyped Swift throws and NSError encourage ignored or ambiguous failures and instead uses a typed Result type plus a simple Swift Future implementation that centralizes error propagation. Implements map and then (flatMap) to compose async steps, demonstrates converting between Result and throws, and reduces nested completion blocks into composable chains. Notes the naive Future works conceptually but handles only a single value stream (use ReactiveCocoa for continuous events) and warns about Futures with map and then needing explicit error-domain translation across layers.

AI-written summary · about

  1. 0:00Introduction and motivation
  2. 2:39The problem with callbacks
  3. 5:59Limitations of NSError
  4. 9:36Improving error handling
  5. 12:10Swift error types
  6. 14:44Result type vs throws
  7. 17:12Handling error patterns
  8. 21:00Introduction to futures
  9. 23:57Implementing map
  10. 30:37Chaining with flat map
  11. 33:36Benefits of futures
  12. 37:16Limitations and alternatives
  13. 39:59Q&A and conclusion
~/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.