Subject: ISO, pl3.33 and number_chars/2

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

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 ([email-masked])                               INET Development
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Ever wondered if jumping out of the frying pan might actually be refreshing?
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~