From paul@inet.co.za  Mon May  8 18:26: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 SAA15788
	for <prolog@swi.psy.uva.nl>; Mon, 8 May 2000 18:26:33 +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 K2TLTMAD; Mon, 8 May 2000 18:27:48 +0200
Date: Mon, 8 May 2000 20:13:35 +0200 (GMT+0200)
From: Paul Sephton <paul@inet.co.za>
To: prolog@swi.psy.uva.nl
Subject: ISO, pl3.33 and number_chars/2
Message-ID: <Pine.LNX.3.91.1000508194902.16025H-100000@pdev.inet.co.za>
MIME-Version: 1.0
Content-Type: TEXT/PLAIN; charset=US-ASCII

Hi, all

I have been busily investigating existing code to determine what would be 
involved in a port from SWI pl3.2x to 3.3x.  I am feeling slightly 
disgruntled at the change in string representation, and subsequent 
introduction of atom_codes/2 to replace atom_chars/2 and redefinition of 
atom_chars etc. since this does mean a lot of grunt work.

I am, however delighted at the introduction of ISO compliance- I'm just 
starting to weigh the costs against gains is all...

Now that I have everyone thoroughly pissed off and confused, and perhaps 
have done enough to attract attention:

  Could someone be kind enough to explain why ISO compliance means 
changing the number_chars/2 (or number_codes/2 if you will) predicate to 
fail dismally with an error message and break out to the top level? 

One could previously use number_chars/2 to both test whether the 
character list was convertible to a number, as well as to convert the 
character list to a number if it was.  Now you bright ISO fellows will 
probably tell me to use phrase/3 to test whether the character list is 
convertible, or to use the wonderful new exceptions mechanism.  It seems 
to me that either of those alternatives would be both inefficient as 
well as clumsy.

After all, the number_chars/2 already does all the checking to find out 
whether I have a valid numeric represented in my string- it must do since 
it fails so well (too well).  So my adding all the grammer rules and 
using phrase/3 would be a complete duplication of effort.  I find 
exceptions to be an eyesore, and would much rather refrain from producing 
messy and unmaintainable code...

Or are we introducing ISO failure codes as an excuse to justify an 
exception mechanism?

Any suggestions?
Paul Sephton  
_____________________________________________________________________________
Paul Sephton (paul@inet.co.za)                               INET Development
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Ever wondered if jumping out of the frying pan might actually be refreshing?
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

