~/talk

Managing Side Effects with Swift

Talkat iOS Conf SG 2025 · 2025-01-15..01-17· [software-architecture, swift]
slides:none on file

Claims that Swift can give deterministic, testable core logic while still performing real IO by: extracting pure logic, using dependency injection for console/random, or describing effects as effect descriptors (an enum with continuations) interpreted by an effect handler. Demonstrates a console number‑guessing game and echo program that run correctly and a testing style that steps through each observable effect, avoiding heavy mocking (mentions Mockingbird) and bridging to async with withCheckedContinuation and macros to restore direct style. Tests validate effect order and return a final playAgain Boolean.

AI-written summary · about

  1. 0:00Managing side effects in Swift
  2. 6:43Pure vs effectful functions
  3. 10:17Divide and conquer side effects
  4. 12:44Dependency injection for control
  5. 18:28Effect descriptors approach
  6. 27:38Testing with effect descriptors
  7. 31:10Direct vs continuation passing
  8. 34:04Recap and approach choice
  9. 36:11Q&A
~/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.