Recently I started to write #Elixir in a bit different way
https://katafrakt.me/2025/09/23/ocaml-flavoured-elixir/
Post
Recently I started to write #Elixir in a bit different way
https://katafrakt.me/2025/09/23/ocaml-flavoured-elixir/
@katafrakt That's a nice technique!
Though, one thing that tripped me over using a similar approach is an early result wrapping.
In other words, the code feels more conventional when `get_*` methods return `struct{} | nil` and you reach for `{:error, error}` when it's really needed, like in the post's example.
It's not that bad either way, there could be a helper that translates errors `Result.map_error`, but it feels a bit too out of place in Elixir, at least for me.
A space for Bonfire maintainers and contributors to communicate