4 comments

[ 0.29 ms ] story [ 21.4 ms ] thread
The "normal" third option is Maybe or Option types. (Though if you squint, that can look like returning an error with an unusual encoding.)

The solution proposed here looks like setting a thread property on error, and if you don't clear it, then subsequent function calls fail (if I read that right). Personally, I don't love it. I prefer my error handling to be open rather than hidden.

Yes, Option type is a special value type.

The solution here is more oriented towards glue code, code which strings together multiple API calls. The attempt is to provide a set -e type error handling for such code.

What I have seen is that some error handling, even if it not perfect, is better than letting errors be ignored.