Subject: Re: handling small numbers

From: Paul Sephton <[email-masked]>
Date: Mon, 8 May 2000 20:27:42 +0200 (GMT+0200)

Feel free to ignore this suggestion- but I do believe it's a practical one:

How about simply using the languages inherent properties, and simply 
failing the goal?  After all, if the programmer knows that the integer 
representation has a maximum of 32 bits and happens to produce a larger 
number, that is what I would like to expect.

Silently promoting to a float has a lot of advantages- but should be 
an optional extension.  I like this a lot.

Likewise, exceptions generated by overflows/underflows ( or anything else 
for that matter) can be a real pain in the neck, and as I have pointed 
out, the language can manage quite well without this:

go(X) :-
  X is VeryBigNumber1 * VeryBigNumber2.
go(_) :-
  writef('Sorry- cannot seem to get the answer\n').

Dash it all- program flow in prolog is based on exceptions!

Paul
_____________________________________________________________________________
Paul Sephton ([email-masked])                               INET Development
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Ever wondered if jumping out of the frying pan might actually be refreshing?
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~