Path: utzoo!attcan!uunet!husc6!bbn!rochester!cornell!batcomputer!itsgw!steinmetz!davidsen From: davidsen@steinmetz.ge.com (William E. Davidsen Jr) Newsgroups: comp.lang.c Subject: Re: trigraphs in X3J11 Message-ID: <10941@steinmetz.ge.com> Date: 23 May 88 15:55:34 GMT References: <5215@ico.ISC.COM> <7937@brl-smoke.ARPA> Reply-To: davidsen@crdos1.UUCP (bill davidsen) Organization: General Electric CRD, Schenectady, NY Lines: 50 In article <7937@brl-smoke.ARPA> gwyn@brl.arpa (Doug Gwyn (VLD/VMB) ) writes: | In article <5215@ico.ISC.COM> rcd@ico.ISC.COM (Dick Dunn) writes: | >The draft standard seems to be written in such a way that a compiler MUST | >accept these trigraph sequences. | | Yes, a standard-conforming implementation MUST understand trigraphs. This is the first case I've seen where the committee really blew it in my opinion (yes I could live with noalias). I completely agree with the need to do this, but as currently implemented will cause a number of problems. A preprocessor function could specify the trigraph inducer, with the default "none" to avoid breaking existing programs. The committee seems to have lost sight of that goal in this case. The same functionality could be provided by a new preprocessor function (can't break existing programs). Consider: #trigraph ?? Now your program can run on my machine, using the notation you used. If I choose, I can run it through a filter and convert to full ASCII. Better yet, I can take my existing programs and convert them before sending them to you. Why do it this way? If I want to send you a program of mine, which I wrote filled with the ?? sequence **like many machine control programs which have to get certain ASCII characters to the device** I can give you another sequence: #trigraph TX This is ugly as hell, but it will let you edit the program, and not break it. PLEASE X3J11, fix this sucker! It CAN be done without breaking existing programs. It makes more sense in the preprocessor. Best reason is that as specified it will lead to compilers which don't do full ANSI by default, or even subset compilers. I scanned my local source directory and found three programs of 102 which would break. I don't know if that's typical, but why do it wrong when it can be done another way. I did NOT scan the directory of programs which do device control, since I have made that point and every one would break and have to be handcoded with escape sequences, etc, do get by this. -- bill davidsen (wedu@ge-crd.arpa) {uunet | philabs | seismo}!steinmetz!crdos1!davidsen "Stupidity, like virtue, is its own reward" -me