comp.lang.ada
 help / color / mirror / Atom feed
From: Georg Bauhaus <rm.dash-bauhaus@futureapps.de>
Subject: Re: sharp ß and ss in Ada keywords like AC CESS
Date: Thu, 13 Oct 2011 17:18:31 +0200
Date: 2011-10-13T17:18:31+02:00	[thread overview]
Message-ID: <4e970147$0$6576$9b4e6d93@newsspool3.arcor-online.net> (raw)
In-Reply-To: <179ii830sh36v.dto72qcmif76.dlg@40tude.net>

On 13.10.11 15:25, Dmitry A. Kazakov wrote:
> It refers to "alphabets" and "spellings". Why should
> anybody care about them?

Many German programmers *do* care about them.
Most issues arise in proportion to the ease with which
a language allows mixing of alphabets: If you allow all
kinds of identifiers, people will try them.


>>    Some_Year : constant := MCD92;
>>
>> Yeah, that's fun. And there are no Chinese digits
>> in it, so Europeans and Americans will likely recognize the
>> intent.
> 
> Motor control device, the model of the year 1992?

More clearly,

   Some_Year : constant Natural := MCD92;


>> But otherwise? What's the point when mixing two
>> numeric alphabets?
> 
> 9 and 2 are not letters.

M, C, and D, in this hypothetical examples, are digits,
not letters; the example is not that far-fetched, since
roman numerals are known well.  The point is not that
identifiers can have digits in them.  The point is that
is has seemed reasonable to let digits of numeric be drawn
from the "alphabet" '0' .. '9', and no others.

IOW, there is a single "alphabet" of digits, other digits
will not be acceptable when forming numeric literals.

I think this is reasonable.  The one-alphabet rule for
simple names is not much different.


>> "the Swiss model (which is without ß) is working."
> 
> I bet 90% of Ada users could not care less.

It will be interesting to learn what your bet is thus why
- 90% will not care
- 10% do care

I agree that many do not care about anything other than ASCII.
With the usual consequences that carelessness tends to foster
regarding the I/O of non-computer text.


>> 1) I /= І, since they are from "alphabets" that real people
>>    think are different.
> 
> Show me one, who thinks they are different without hexadecimal editor. 

My terminal, as I said, shows the difference between I and І very
clearly. Any compiler shows they are different identifiers.
As I said, obfuscation is programmer's business.

Starting to feel like a broken record, the same goes for ASCII
l, 1, i, I. Consequently, GNAT sources show a rule: I is not the
name of an indexing variable...  I'm just considering something
that is a generalization, simple, practical, worldly, neither purporting
to solve issues of discipline, nor pretending to erase all obfuscation.

> If some nonsensical language rules put projects at risk, then, maybe, there
> is something wrong with these rules?

I have shown how to apply the rules and how they don't do any harm.
They reduce complexity. They hardly put anything at risk, I think,
since they only reduce the number of identifiers (do not mix "alphabets").

> Real people also think that sch=sh, kn=n (at the beginning of the word),
> oo=u, ee=i and ad infinitum.

This is demonstrably false, since, for example, those who write(!)
using Latin will never in fact replace "kn" with "n".


>> "Mass" has four Latin characters, "Maß" has three,
> 
> So why are they equivalent?

Because people say, in large numbers, that they are equivalent.


>>> If "Latin" does not mean Latin, then you need yet another nonsensical rule
>>> to redefine it.
>>
>> "Latin" is here meant to refer to the general thing.
>> "Latin characters used in Europe" is pretty clear,
> 
> Does this include Greece, Serbia, Bulgaria?

This should be clear from the original list; also
"Latin characters used in Europe" is pretty clear
to anyone not trying to twist things.

>> Declaring simple unions of sections from Unicode is easy,
>> and consistent.
> 
> Again, what is the rationale?

To reduce complexity of identifiers, and to make reading easier.


>> but programmers see characters
>> if you ask them.
> 
> Nope, it is a physiological fact that people see glyphs.

A)  "It's the 3rd character from the right".

B)  "It's the 3rd glyph from the right".

How likely is it that any real programmer will say sentence
B, and not A?


>>> You cannot
>>> safely recognize alphabet looking at a single word. 
>>
>> I am looking at programs, not at single words.
> 
> Does this mean that a program may not use several alphabets?

Of course not, as stated, this applies to simple names.
A simple name alone is not a program, and has little meaning.

> I don't care about
> Swiss model, I do about separate compilation. I don't want the legality of
> components (tested, verified, validated) be randomly dependent on other
> parts by mere placing them into one project.

We could never reuse anything but Ada 83 units: The legality
of components would have to be re-established under the rules
of more recent Adas.
  Of course, everything about "alphabets" applies to software
that is written, or changed systematically. Somewhat like turning
a C program into a MISRA-C program, or an Ada program into one
to which a profile applies.  This changes the language, but you
do it for a reason.





  reply	other threads:[~2011-10-13 15:18 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                 ` sharp " Randy Brukardt
2011-10-12 21:18                   ` 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 [this message]
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