3 ms·
Having worked with erlang for some time now, https://www.erlang.org/eeps/eep-0049 https://www.erlang.org/eeps/eep-0049 is _very exciting_ to me. One of the issu
by distortedsignal 4y ago
Having worked with erlang for some time now, https://www.erlang.org/eeps/eep-0049 https://www.erlang.org/eeps/eep-0049 is _very exciting_ to me. One of the issues that I have with the codebase that I'm in is deep nesting, which could be solved with this feature. Very compelling.
(HN mods: feel free to delete this comment or my comment at https://news.ycombinator.com/item?id=31426002 https://news.ycombinator.com/item?id=31426002, since they're the same content)
- barkerja 4y agoThis 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]