4 ms·
This is great. I hope this finds its way to Elixir land.
by barkerja 4y ago
This is great. I hope this finds its way to Elixir land.
- linkdd 4y agoThis already exist with the `with` expression, no?
- kemiller 4y agoYeah, `with` is pretty much this.
- dugmartin 4y agoIt is already there with the "with" macro. The EEP doc calls it out: https://www.erlang.org/eeps/eep-0049#elixir https://www.erlang.org/eeps/eep-0049#elixir "This is the most general control flow in this document, being fully flexible with regards to which values it can handle. This was done in part because there is not a strong norm regarding error or valid values in either the Erlang nor Elixir APIs, at least compared to other languages here. This high level of flexibility has been criticized in some instances as being a bit confusing: it is possible for users to make error-only flows, success-only flows, mixed flows, and consequently the ˋelseˋ clause can become convoluted."
- deleted 4y ago[deleted]