Comment by superlucky84
4 days ago
Good question.
Early termination is the most common use case, but it’s not the only thing SideEffect represents. The name is intentionally a bit broader — it’s meant to model “effects where normal composition should stop”.
In practice, that includes things like validation failures, logging or notifications at pipeline boundaries, and error reporting or metrics. That said, the scope is deliberately conservative.
SideEffect isn’t meant to be a general-purpose effect system. If it were, it would quickly turn into something very close to a monad or effect framework, which I’m intentionally avoiding.
No comments yet
Contribute on Hacker News ↗