Every story and comment from the Hacker News API, in a layout borrowed from 2001.
A comment on The Gleam Programming Language. Parent comment
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`.
There are no comments on this comment yet.
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`.