Structured concurrency and pure functions, by Adam Warski

An interesting new article about structured concurrency and functional purity:


wrt tracking side-effects for purity in the functional world, there’s an incoming breakthrough FYI.

take away is: Monad is performant in effect tracking, but painful (ergonomics wise) to compose; algebraic effects compose nicely ergonomics wise, but current implementations perform poorly to be production ready; with a low-level primitives added to the GHC RTS , a performant implementation is coming to reality.

relating to structured concurrency, I think as a consumable effect, a functionality can even hide whether it works async or sync as an implementation details, then various effects can compose well together, regardless they are async or sync in nature, only if the effects are properly abstracted to some specification.