comp.lang.ada
 help / color / mirror / Atom feed
From: "Randy Brukardt" <randy@rrsoftware.com>
Subject: Re: sharp  and ss in Ada keywords like ACCESS
Date: Wed, 12 Oct 2011 15:17:21 -0500
Date: 2011-10-12T15:17:21-05:00	[thread overview]
Message-ID: <j74skj$lfn$1@munin.nbi.dk> (raw)
In-Reply-To: 1jwwodd91xfc8$.1xbuqt6j4xh5$.dlg@40tude.net

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain, Size: 2970 bytes --]

"Dmitry A. Kazakov" <mailbox@dmitry-kazakov.de> 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.





  parent reply	other threads:[~2011-10-12 20:17 UTC|newest]

Thread overview: 32+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-10-10 16:30 sharp ß and ss in Ada keywords like ACCESS Georg Bauhaus
2011-10-10 16:46 ` Adam Beneschan
2011-10-10 18:23   ` Georg Bauhaus
2011-10-10 22:25     ` sharp � " Randy Brukardt
2011-10-11  7:36       ` Dmitry A. Kazakov
2011-10-11  7:41         ` sharp ß " Yannick Duchêne (Hibou57)
2011-10-11  8:33           ` Dmitry A. Kazakov
2011-10-11 20:32             ` sharp � " Randy Brukardt
2011-10-12  7:43               ` Dmitry A. Kazakov
2011-10-12  9:42                 ` J-P. Rosen
2011-10-12 12:09                   ` Dmitry A. Kazakov
2011-10-12 20:17                 ` Randy Brukardt [this message]
2011-10-12 21:18                   ` sharp " Dmitry A. Kazakov
2011-10-11 17:33     ` sharp ß " Martin Krischik
2011-10-11 18:54       ` Adam Beneschan
2011-10-12 13:03       ` Georg Bauhaus
2011-10-12 13:48         ` Dmitry A. Kazakov
2011-10-12 18:24           ` Georg Bauhaus
2011-10-12 20:06             ` sharp � " Randy Brukardt
2011-10-12 20:48             ` sharp ß " Dmitry A. Kazakov
2011-10-12 22:56               ` sharp ß and ss in Ada keywords like AC CESS Georg Bauhaus
2011-10-13  8:10                 ` Dmitry A. Kazakov
2011-10-13 12:13                   ` Georg Bauhaus
2011-10-13 13:25                     ` Dmitry A. Kazakov
2011-10-13 15:18                       ` Georg Bauhaus
2011-10-13 19:17                         ` Dmitry A. Kazakov
2011-10-11  7:33   ` sharp ß and ss in Ada keywords like ACCESS Yannick Duchêne (Hibou57)
2011-10-11 14:32     ` Adam Beneschan
2011-10-11 17:26   ` sharp ß and ss in Ada keywords like ACCESS (better not) Martin Krischik
2011-10-12 12:34     ` Georg Bauhaus
2011-10-10 17:22 ` sharp ß and ss in Ada keywords like ACCESS Simon Wright
2011-10-10 17:45 ` AdaMagica
replies disabled

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox