W
Walter Bright
Richard said:Walter Bright said:
...unless it makes business sense or technical sense to do that, which it
might, one day.
So what if some future encoding doesn't have a '?' ? Then trigraphs
won't work. If C is concerned about such a possibility, why does it
require the '?' character to exist, or any other character? '?' isn't a
valid character in the (once popular) RADIX50 encoding.
(The Microsoft Office guys had much the same opinion of int
- "the compiler guys wouldn't change the size of an int on us - they know
it'd break all our code", but the compiler guys changed it anyway.
Programmers knew that ints were going from 16 to 32 bits, and it was
useless to resist such a change. If it really was going to make life
impossible for the Office guys, I'm sure they had the clout to get a
special compiler built just for them. Microsoft wasn't going to endanger
the revenue stream from Office.
(The above is reasonable speculation on my part, I don't have any inside
knowledge of Microsoft.)
Trigraphs would be great if they solved the problem you mentioned. But
they don't. People overwhelmingly write C code using fancy characters {
and [, and that source code fails on EBCDIC systems. You're going to
have to run the source through a translator whether trigraphs are in the
standard or not.
That's mostly true, yes, although I did work on one site which required the
programmers to use trigraphs in their code (which was written and debugged
on PCs before being moved up to the mainframe for testing).
It's a silly requirement, because a trigraph translator program is about
as trivial as it gets. Heck, CR-LF translation is routine. A viable
EBCDIC system these days has already got to be doing a lot of
translation of ASCII <-> EBCDIC in order to deal with an ASCII world.
Those PC C programs you wrote had to be translated *anyway* to move them
to the mainframe.