This EEP adds a contextual <~ operator to begin ... end expressions, which allows them to be usable for value-based error handling, based on standard {ok, term()} | {error, term()} return value types.

This lets begin ... end become a control flow construct to replace or simplify deeply-nested case ... end expressions, and prevent using exceptions for control flow.

I want to thank Jesper Louis Andersen, Sean Cribbs, Tristan Sloughter, Evan Vigil-McClanahan, Anthony Ramine, Bryan Paxton, and Pedram Nimreezi for their feedback on this document.

The draft is attached to this document, and also available (along with an incomplete reference implementation to explore some semantics) at https://bitbucket.org/ferd/unwrap

Regards,
Fred.
_______________________________________________
eeps mailing list
[email protected]
http://erlang.org/mailman/listinfo/eeps

Reply via email to