@hongminhee@hollo.social

Enjoyed this wiki post by the author of Garnet on effect systems: [[PonderingEffects]]. What I liked is that it doesn't just describe the design space: it's honest about what the author finds confusing or unconvincing, including a skeptical take on algebraic effect handlers specifically. The Lobsters thread is worth reading too; someone points out that what the post calls “effects on data” is already studied under the name coeffects, which was news to me.

lobste.rs

Pondering Effects

6 comments

1 reply

Reading this also made me realize I've had a soft spot for dynamic scoping/implicits for a long time… probably since I first used @mitsuhiko's Flask, where the request context object was just there without you having to pass it around. Felt like magic, then felt like a footgun, then felt like a reasonable tradeoff again. Python has since put contextvars in the standard library, which is essentially the same idea.

docs.python.org

contextvars — Context Variables

This module provides APIs to manage, store, and access context-local state. The ContextVar class is used to declare and work with Context Variables. The copy_context() function and the Context clas...