TAKING YOUR SIDE-EFFECTS ASIDE
summary
Builds a lazy IO type in Scala that starts as a simple data wrapper for side effects, then makes it stack-safe by representing flatMap as data and using monad associativity to trampoline recursive binds, and finally adds asynchronous support via a register(callback) primitive implemented with a latch. Demonstrates that this approach avoids Future’s eager execution, tests with a forever loop to expose stack overflow, and recommends Monix/fs2 (Task) as production-ready.
AI-written summary · about
chapters (5)
related talks
31mThe Eff monad, one monad to rule them all
42mThe making of an IO
43mSurviving a world overflowing with effects
42mMonix Task: Lazy, Async and Awesome
27mBRING YOUR OWN EFFECT
23mEffects types in Scala - how to choose one
30mTroll Driven Development: Implementing Functional Effects by Way of Self-Lobotomy
44mCAN WE FREE CONCURRENT PROGRAMMING FROM THE MONADIC STYLE
