(j3.2006) For consideration at 200 - 21 more proposals

Malcolm Cohen malcolm
Wed Nov 28 19:40:44 EST 2012


>The original justification for FORTRAN in 1956 was to reduce labor cost
>and increase reliability.

Well blow me down with a feather, why wasn't I told about this.

Some might opine that Fortran is an extensible language with modules,
procedures, and object orientation, precisely so that programmers can write
the functionality they desire.

>     2.  Caseless INDEX, SCAN, VERIFY;  UPPER_CASE and LOWER_CASE -

Sorry but asking for so-called "caseless" SCAN and VERIFY is what I would
call "fundamentally misguided".  Just list the set of characters you want to
scan/verify for...

As for UPPER_CASE and LOWER_CASE, which in the paper was described as "at
least for ASCII", words fail me.   It is easy to write the one that *you*
want, not so easy to write the one that *someone else* wants (since you
don't actually know their requirements).  To write one that works "only for
ASCII" is trivial and does not warrant inclusion in the standard.  (If you
really give no care to non-US folk it is a one-liner with ACHAR, IACHAR and
IAND/IOR.)

What is not trivial is handling the locale appropriately, and C's locale
machinery is both complicated and not exactly a shining example of elegant
success.

To take just one particular point, what is UPPER_CASE supposed to do with a
character that has no uppercase variant?  Some will want it to turn it into
the 2 uppercase characters that it represents, others will want to leave it
as the single lowercase combined character.  "caseless" INDEX has a similar
conundrum handling such characters.  What if the input data is in
ISO-Latin-5 instead of ISO-Latin-1?   Confusion abounds.

The Unicode consortium have an interesting selection of Technical Reports
and the like on their website concerning issues like case handling and
collation.

IMO, these intrinsics that are guaranteed to give the wrong answer for
ISO-Latin-1 let alone every other character set in the world apart from
US-ASCII only, are not suitable for inclusion in an international standard.

Cheers,
-- 
...............................Malcolm on holiday wishing he had not read
his email. 




More information about the J3 mailing list