On Wed, Sep 20, 2017 at 16:12 -0700, you wrote:
What are your thoughts on error handling?
Good question, two parts to that.
First, along the lines of Justin's response, the function is free to
return whatever it considers the appropiate result for an error case.
The only constraint is that it *has* to return something because
there's no way to get back without passing on a result.
Second, one thing that "async" doesn't have right now is an equivalent
of "when"'s "timeout", i.e., alternative code to execute if the
asynchronous code takes too long. I'm not sure if we could support
that with "async" because we'd need an alternative way to leave the
calling function and could run into an issue with memory leaks (not
completely sure here, but it's smells similar to the problem we have
with propagating interpreter exceptions up the stack). That said, I'm
also not sure how a timeout would even fit in syntactically, so maybe
the nest answer here is just sticking to "when" if one needs a
Robin Sommer * ICSI/LBNL * robin(a)icir.org * www.icir.org/robin