32 ms·
No. I've been burned by this in other projects (see e.g. https://github.com/0xYUANTI/tulib/blob/master/include/types.hrl https://github.com/0xYUANTI/tulib/blob
by dmitriid 5y ago
No.
I've been burned by this in other projects (see e.g. https://github.com/0xYUANTI/tulib/blob/master/include/types.hrl https://github.com/0xYUANTI/tulib/blob/master/include/types....)
You code will soon be a mish-mash of thunk(lift(unlift(thunk(err))))s
These things have to be a part of the language, or not at all
- linkdd 5y agoOr thanks to elixir's pipeline operator: err |> thunk() |> unlift() |> lift() |> thunk() Which is already more readable. And I choosed the Rust terminology for a reason, I think and_then/or_else is way clearer than fmap/bind. But I agree, I would love for Elixir to have a builtin Result type.