Representing the case "no result"



Robert Dodier wrote:
> On 6/9/09, Raymond Toy <raymond.toy at stericsson.com> wrote:
>
>   
>> Is there something inherently wrong with Lisp's approach of signaling
>> errors and letting the user, if desired, handle it appropriately,
>> including not at all?
>>     
>
> OK by me, but let's figure out some different terminology.
>   
I suggest that you either use the Common Lisp terminology and/or the 
IEEE floating-point terminology.
I suspect they are compatible.  There are lots and lots of papers on the 
subject, and implementations, in hardware even, of
the IEEE specification.  I think the term "signal" in Ray's note was not 
meant to indicate that this would be the name for anything, but
just an informal English word to include such lisp eventualities as 
errors, exceptions, traps, interrupts, or whatever.



> "Signal" means something else in a POSIX-ish context,
> which, while it is obscure, is still approximately 100 times
> better known than Lisp.
As I recall, a terrible concept too.  Sort of like "goto" on steroids.

>  "Handler-case" is just ugly.
>   
This could be macro- papered over if you have a prettier version in mind!
> "Condition" is confusing; it doesn't have anything to do with
> conditional expressions. We could say "exception" instead.
>   
Except that conditions and exceptions are different things.

While the whole ball of wax that comes with IEEE floating-point is 
probably not relevant, its design is worth
studying, simply because it represents the emerging consensus from many 
people who had, by and large,
thought pretty hard about the alternatives, argued their merits, and 
were convinced to join the consensus.

(Consider: would we want to do this:

block([float_exceptions:silent,
           divide_by_zero_flag:0],
    ......
   if divide_by_zero_flag>0 then print("the computation included one or 
more divisions by zero")
   )


RJF