[eeps] EEP ???: Value-Based Error Handling Mechanisms

Fred Hebert mononcqc@REDACTED
Tue Sep 4 23:06:20 CEST 2018


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.



More information about the eeps mailing list