

Alex Ozun
Staff iOS Engineer @ American Express

I work as a Staff Engineer at American Express. I’ve spent last 10 years of my career working with unidirectional architectures and effect systems.
Effect Systems: a powerful alternative to Dependency Injection
Swift apps depend on side effects such as disk I/O, networking, randomness, and concurrency. While essential, side effects make code harder to extend, customise, and test.
Today, they are managed with DI frameworks and opinionated architectures. This often requires invasive scaffolding and sometimes forces procedural code into unidirectional data flow.
This talk presents Swift Effect, an architecture-agnostic effect system that makes side effects controllable, composable, and testable while keeping the code linear.
The talk introduces Algebraic Effects and Effect Handlers, and demonstrates how they unlock:
- Natural composition of behaviour
- Deterministic Swift Concurrency testing
- Mock-less testing of complex programs
Effect handlers can intercept, suspend, and resume side effects at runtime, enabling step-by-step execution of application code. This enables writing tests for observable behaviour and state changes, mirroring a human tester interacting with a running program.
