Side Effects are a Public API
summary
Argues that side effects should be explicit values and shows a working Python library that implements that: Effect library for Python uses a do-style generator decorator, intent objects like Prompt and Display, a type dispatcher to map intents to performers, and sync_perform to run effects. Tests declare an expected sequence and use perform_sequence testing API to simulate results and assert order. Covers Twisted integration (TXEffect), a parallel-effects intent, and a Haskell port using free/operational for testable interpreters.
AI-written summary · about
chapters (10)
- 0:00Introduction
- 3:29Intrinsic Side Effects
- 5:44Testable Side Effects
- 8:46Do decorator
- 15:52Test API
- 19:42Twisted Library
- 22:35Abstracting Over Effects
- 26:40Free Monads
- 32:40Conclusion
- 33:00Questions
related talks
38mSide Effects are The Complexity Iceberg
49mA Practical Introduction to Eff in Haskell
27mKeep Your Sanity with Redux Sagas
28mLanguage Support for Property-Based Testing
25mScale By The Bay 2018 Unconference: Joe Kachmar
17mTesting in a Reactive Way
21mTrace-Guided Synthesis of Effectful Test Generators
15mFuzzing Channel-Based Concurrency Runtimes using Types and Effects
