draft ANSI standard: trigraphs rear their ugly heads again

Andries Brouwer aeb at mcvax.cwi.nl
Thu Dec 4 03:40:13 AEST 1986


In article <1381 at hoptoad.uucp> gnu at hoptoad.uucp (John Gilmore) writes:
>...
>My preliminary answers are:  C programs that use ASCII characters had
>damn well better be strictly conforming, or every C program in the world
>is broken.  C compilers on European machines could support the national
>letters in identifiers and such, but any program that used this feature
>would not be portable.
>
>Since a European C compiler which supported using the local characters
>AS LETTERS would encourage unportable code, it would be better to make
>European C compilers which did not support using the local characters
>as letters.  This is tough, but are we trying to be nice or are we
>trying to encourage portability?

What you ask, in fact, is that everybody in the world use english
when programming. In Danish, for example, {,|, and } are three major
vowels, like a, o and u in English. What would you say if I were to
suggest that you'd better avoid a's, o's and u's in your identifiers?

Your view about non-portability is a bit too pessimistic.
It would be very easy to modify existing compilers to accept
a pragmat (compiler directive) like
#letter "{|}"
so that each source program could define its set of letters used
in identifiers. Of course, one has to use trigraphs for the symbols
lost this way, but I can assure you that that is much to be preferred
above seeing letters in places where one expects punctuation.



More information about the Comp.lang.c mailing list