New APIs for new exception handling?

Vance Shipley vances@REDACTED
Tue Oct 5 22:01:52 CEST 2004

Having reviewed the paper on the new exception handling in R10
I am left wondering how things will change with it's availability.

My application behaviour modules often have blocks of sequential
initialization which will benefit from the whole try...of...catch
...after...end.  So I can see that try will make it into new code
right away and I can see it getting quite a bit of use.

What I wonder about is how we'll deal with existing APIs which 
return tagged tuples like the start functions of gen_fsm, gen_server
and supervisor and the gen_tcp and gen_udp modules.  After a point
it will seem somewhat awkward to be dealing with {ok,Value}/{error,Reason}
tuples.  It was never too clear to me which form was the one to use in
my own APIs.  I like the out of band exception handling so returning
a raw value or exiting has been the rule of thumb however when working 
with OTP a tagged tuple is required for the return of init functions.
This requirement would bleed into other functions as using them as the
tail of the init function was natural.

Will we see the introduction of a paralell choice to many of these
functions which uses the pure out of band exception handling? 


More information about the erlang-questions mailing list