[gambit-list] Indicating unusual conditions

Eric Merritt cyberlync at gmail.com
Sun May 8 18:51:08 EDT 2005


I have a question  concerning indicating unusual conditions in gambit.
This is more a stylistic question rather then a technical question,
but its worth knowing what others are doing.

  Say I have a piece of library code that accepts an optional timeout.
There are any number of things that could occur if the timeout
expires. For example, in SML/Ocaml I would probably just raise an
exception. That's pretty standard in that language and it costs almost
nothing in overhead. In Erlang I would probably return a tuple like
{timeout, some_other_data}. What is usual way to do this in gambit? 
Is it common to simply raise an exception? Is it more acceptable to
return a special value like Erlang or C? I am thinking that raising an
exception is the correct thing to do, but I wouldn't mind having
confirmation on that.



More information about the Gambit-list mailing list