Nitpicking #42

classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

Nitpicking #42

Martin Lafaix

Is there a more elegant way to test the identity of two Rexx
strings than:

  if (Object string1) == (Object string2) then
    ...

The above works just fine, but I find it ugly, long to type and
not that readable :-)

[In case some are wondering, I'm doing tens of millions of
 comparisons between Rexx strings, and, for space and efficiency,
 they are all resolved through a pool, so that two Rexx strings
 are equal if and only if they are the same object.  Comparing
 10,000,000 times two identical 26-characters Rexx strings takes
 12" here when using Rexx's ==.  One hundred time that (i.e.,
 1,000,000,000) comparisons with the code given above takes less
 that 6".  I _want_ those seconds :-) ]


Martin
--
[hidden email]
Team OS/2
http://www.multimania.com/lafaix

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
To unsubscribe from this mailing list ( ibm-netrexx ), please send a note to
[hidden email]
with the following message in the body of the note
unsubscribe ibm-netrexx <e-mail address>

Reply | Threaded
Open this post in threaded view
|

Re: Nitpicking #42

Mike Cowlishaw-2


The sequence

  if (Object string1) == (Object string2) then ...

is the right way to do this.   I've considered adding an 'ultra-strict
compare' (=== and \===) for this, but not entirely convinced it's needed
:-)


- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Mike Cowlishaw, IBM Fellow
mailto:[hidden email]  --  http://www2.hursley.ibm.com


~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
To unsubscribe from this mailing list ( ibm-netrexx ), please send a note to
[hidden email]
with the following message in the body of the note
unsubscribe ibm-netrexx <e-mail address>

Reply | Threaded
Open this post in threaded view
|

Re: Nitpicking #42

mcbrides
>
>
>The sequence
>
>  if (Object string1) == (Object string2) then ...
>
>is the right way to do this.   I've considered adding an 'ultra-strict
>compare' (=== and \===) for this, but not entirely convinced it's needed
>:-)

I'd happily except a more strict compare option. One question, would it behave
faster than the current strict (==) compare?



--

/--------------------\
| Jerry McBride      |
| [hidden email] |
\--------------------/

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
To unsubscribe from this mailing list ( ibm-netrexx ), please send a note to
[hidden email]
with the following message in the body of the note
unsubscribe ibm-netrexx <e-mail address>

Reply | Threaded
Open this post in threaded view
|

Re: Nitpicking #42

Mike Cowlishaw-2
In reply to this post by Martin Lafaix


Ultra-strict: would mean 'objects must be the same object', rather than
'objects must contain the same characters in same order'.

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Mike Cowlishaw, IBM Fellow
mailto:[hidden email]  --  http://www2.hursley.ibm.com


~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
To unsubscribe from this mailing list ( ibm-netrexx ), please send a note to
[hidden email]
with the following message in the body of the note
unsubscribe ibm-netrexx <e-mail address>