This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Query on UTF-32 encodings for letters


Georg Bauhaus wrote:

I for one am looking forward to portable international Ada source code.

Yes, of course, but I still argue against trying to do this extended case folding.

Why? Because it seems wrong in any case in Ada programs not to spell
the same identifier in a uniform way throughout the program. That can
never help the reader, and the reader is always favored over the writer
in Ada land. Indeed the standard options used to compile GNAT itself
enforce this usage throughout the compiler and run time.

That does not mean that I prefer the approach of C. I think it is also
confusing to users to have random use of say FirstNode and firstNode
in the same program -- yes I realize that there are some stylized uses
that may be helpful, but the potential for confusion is high, and indeed
most C programmers adopt coding conventions that prevent this kind of
usage in any case.

So ideally programs do not depend on either case sensitivity or
case insensivity in practice. This means that it is perfectly fine
to have either regime in practice if people follow what I consider
to be good style as described above.

Basically what this says is that the only reason for insisting
on case folding is to allow people to write programs that I don't
think should be written in the first place.

For sure you can get portable international Ada source code
without this folding rule.

Furthermore, I worry about tinkering in the future. Suppose someone
discovers a clear error in the folding tables. Do we then modify all
Ada compilers, and make some existing Ada programs illegal. Suppose
someone in Turkey gets real interested in Ada, and then kicks up a
fuss complaining about the equivalence of i and i-dot, again, do we
change the language. I think KISS would have been a better idea here.

Same thing for use of non-letters. Who cares? If it's bad style to use
some wide wide character in an identifier, let coding standards take
care of it. Don't insist on all compilers having big tables and slow
search procedures (or giant tables with fast search procedures) to
figure out what is and what is not a letter.

Oh well, these must be weak arguments, they did not persuade the ARG :-)

Now back to work implementing an efficient binary search
routine to search the rather large case folding table which
has 418 entries!


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]