Comment by instig007
1 month ago
> When you add distribution you cannot make as many assumptions
You absolutely can make all assumptions relevant to the handling/dispatching logic expressed at type-level.
> and as such you encode that into the type with a bunch of optionals.
Not necessarily, it can be `Alternative f` of non-optional compound types that define the further actions downstream.
> Once you have gotten everything into optionals, you’re effectively doing the same checks you’d be doing with a dynamic language everywhere anyway.
Not true, your business logic can be dispatched based on a single pattern comparison of the result of the `Alternative f`.
No comments yet
Contribute on Hacker News ↗