From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: X-Spam-Status: No, score=-1.1 required=5.0 tests=BAYES_00, PP_MIME_FAKE_ASCII_TEXT autolearn=no autolearn_force=no version=3.4.4 X-Google-Thread: 103376,8ea33c39efc56ac3 X-Google-NewGroupId: yes X-Google-Attributes: gida07f3367d7,domainid0,public,usenet X-Google-Language: ENGLISH,ASCII Path: g2news1.google.com!news3.google.com!proxad.net!feeder1-2.proxad.net!newsfeed.straub-nv.de!nuzba.szn.dk!news.jacob-sparre.dk!pnx.dk!jacob-sparre.dk!ada-dk.org!.POSTED!not-for-mail From: "Randy Brukardt" Newsgroups: comp.lang.ada Subject: Re: sharp and ss in Ada keywords like ACCESS Date: Wed, 12 Oct 2011 15:17:21 -0500 Organization: Jacob Sparre Andersen Research & Innovation Message-ID: References: <4e931db5$0$6541$9b4e6d93@newsspool4.arcor-online.net> <1f9a5099-f5f5-49a8-8773-b7eaca771427@s5g2000pra.googlegroups.com> <4e93381d$0$6545$9b4e6d93@newsspool4.arcor-online.net> <1aopal79s1esa$.dabl84c55g4l$.dlg@40tude.net> <1hvfz4aex1o6a$.1hibv8s1wdzy9.dlg@40tude.net> <1jwwodd91xfc8$.1xbuqt6j4xh5$.dlg@40tude.net> NNTP-Posting-Host: static-69-95-181-76.mad.choiceone.net X-Trace: munin.nbi.dk 1318450643 22007 69.95.181.76 (12 Oct 2011 20:17:23 GMT) X-Complaints-To: news@jacob-sparre.dk NNTP-Posting-Date: Wed, 12 Oct 2011 20:17:23 +0000 (UTC) X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 6.00.2900.5931 X-RFC2646: Format=Flowed; Original X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.6109 Xref: g2news1.google.com comp.lang.ada:21397 Date: 2011-10-12T15:17:21-05:00 List-Id: "Dmitry A. Kazakov" wrote in message news:1jwwodd91xfc8$.1xbuqt6j4xh5$.dlg@40tude.net... > On Tue, 11 Oct 2011 15:32:35 -0500, Randy Brukardt wrote: > >> I believe (but haven't checked carefully), that Unicode case folding >> never >> treats Cyrillic and Latin characters as the same (even when it could). > > That is for sure, they are different code points. That has nothing to do with. I think you don't understand very well how identifier equivalence is defined by Unicode (which is borrowed by Ada). Unicode defines something called "full case folding" (as well as "simple case folding"), it defines which characters are considered equivalent by case. Different code points can of course be equivalent (think 'J' and 'j' in the Latin characters, and also the similar Cyrillic characters). >> So this problem would not come up in Ada. > > Depends on what is considered problematic. > > � is not ss and for that matter, it is not ? (beta). Their capital > letters, > if exist (� does not have capital case) are different. Actually, "full case folding" says that "�" == "ss" == "SS" etc. (That's why we decided that we had to diverge from the Unicode recommendations, as the above would be incompatible with Ada 95 programs. Thus Ada 2012 uses "simple case folding", which does not map different length sequences as equivalent.) > If Ada wished to introduce some rules of equivalence for Central European > languages, like �=ss, �=ae, �=oe, and Eastern European languages, like > a=?, > ?=e, and who knows what rules in other languages exist, that would be > hopeless. If Unicode wanted to include such equivalences, Ada would have them too. It's not at all hopeless - we're simply going to do what ever Unicode recommends. (In this specific case, I believe that Unicode recommends not have equivalence.) > But without them, the programmer could have *all* Ada keywords as > identifiers, by replacing appropriate Latin letters with Cyrillic ones. Yup. And so what? It's the price you pay for allowing Cyrillic characters in identifiers. And that is a choice completely out of our hands -- it is mandated by JTC 1 and SC 22. We couldn't have an Ada Standard at all without allowing this. > Furthermore, identifiers looking perfectly same will be different and > there > is a huge number of homonyms of practically *each* reasonable identifier. > I > see it in breach with basic Ada design. As mentioned, it is required as a part of all programming language standards. Is this a bad idea? Sure, I agree with you on that, but we have no choice. J-P's tool or even a compiler-switch can prevent problematic identifiers. We're not allowed to if we want to be an International Standard (emphasis on "International"). [Or just use Janus/Ada; it's unlikely that I'll mess with the pain of these identifiers unless some customer demands it with $$$.] Randy.