←back to thread

97 points appliku | 1 comments | | HN request time: 0s | source
Show context
voat ◴[] No.45158518[source]
The algebraic effect handler pattern is a much simpler mental model than monads. And is transferrable to other languages pretty easily. See something like https://github.com/doeixd/effectively in Typescript
replies(2): >>45158694 #>>45158894 #
epolanski ◴[] No.45158694[source]
1. The effect data type admits an instance of monad, like arrays or option or result. Not sure why would you put those in competition, an effect is a supercharged ReaderResult. The only differences are in naming choices, traverse being called foreach, flat map being called "and then", etc.

2. There is a much more popular and robust implementation of effects for Typescript: https://effect.website/

replies(1): >>45161846 #
1. naasking ◴[] No.45161846[source]
> The only differences are in naming choices

Naming choices matter, as does syntax.