From paul@inet.co.za  Mon May  8 18:40:40 2000
Received: from exchange_rbk02.inet.co.za (exchange-rbk02.inet.co.za [196.38.91.22])
	by swi.psy.uva.nl (8.9.3/8.9.3) with ESMTP id SAA16611;
	Mon, 8 May 2000 18:40:36 +0200 (MET DST)
Received: from pdev.inet.co.za ([196.14.60.35]) by exchange_rbk02.inet.co.za with SMTP (Microsoft Exchange Internet Mail Service Version 5.5.2650.21)
	id K2TLTMA4; Mon, 8 May 2000 18:41:55 +0200
Date: Mon, 8 May 2000 20:27:42 +0200 (GMT+0200)
From: Paul Sephton <paul@inet.co.za>
To: Jan Wielemaker <jan@swi.psy.uva.nl>
cc: "Richard A. O'Keefe" <ok@atlas.otago.ac.nz>, jan@swi.psy.uva.nl,
        ok@atlas.otago.ac.nz, prolog@swi.psy.uva.nl, timm@csee.wvu.edu
Subject: Re: handling small numbers
In-Reply-To: <00050810012701.10047@gollem>
Message-ID: <Pine.LNX.3.91.1000508201900.16025I-100000@pdev.inet.co.za>
MIME-Version: 1.0
Content-Type: TEXT/PLAIN; charset=US-ASCII

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 (paul@inet.co.za)                               INET Development
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Ever wondered if jumping out of the frying pan might actually be refreshing?
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

