home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #30 / NN_1992_30.iso / spool / comp / std / c / 3221 < prev    next >
Encoding:
Text File  |  1992-12-16  |  6.3 KB  |  114 lines

  1. Path: sparky!uunet!sdrc!thor!scjones
  2. From: scjones@thor.sdrc.com (Larry Jones)
  3. Newsgroups: comp.std.c
  4. Subject: Re: <iso646.h>
  5. Summary: <iso646.h> explained
  6. Keywords: Standard C international header implementation
  7. Message-ID: <2403@sdrc.COM>
  8. Date: 16 Dec 92 22:37:57 GMT
  9. References: <19457@smoke.brl.mil> <Bz7tKM.KDF@grex.ann-arbor.mi.us>
  10. Sender: news@sdrc.COM
  11. Lines: 101
  12.  
  13. In article <Bz7tKM.KDF@grex.ann-arbor.mi.us>, mcdaniel@grex.ann-arbor.mi.us (Tim McDaniel) writes:
  14. > What is a "normative addendum"?
  15.  
  16. ISO allows for two different types of addenda (appendices): normative
  17. and non-normative.  A normative addendum is an actual part of the
  18. standard, a non-normative addendum is explanatory comments which are not
  19. part of the official standard.  Addenda can be part of the standard from
  20. the very beginning or can be added after the fact to modify or clarify
  21. an existing standard.
  22.  
  23. > What insane asylum added digraphs to the existing trigraph mess, and
  24. > also said that the "difficult" characters have to exist anyway?  What's
  25. > the point of trigraphs and digraphs then?
  26. > What fool made these identifiers ("or", "ne", ...) reserved?  "If you
  27. > want PL/I ..." and all that.  (Designing a language from scratch, I
  28. > would have used "and", "or", et cetera.  But C didn't, but now we have
  29. > both.)
  30.  
  31. This is a bit of a contentious issue, so I will try to keep my personal
  32. opinions in check until after I relate the facts.
  33.  
  34. First, a bit of history.  Back when X3J11 was working on the ANSI C
  35. Standard, one of the deficiencies of C that the committee was asked to
  36. address was the problem that C used most of the ASCII character set but
  37. many machines do not have all of those characters available.  In
  38. particular, when ASCII (which is a US standard [X3.4]) was
  39. internationalized into ISO 646, a number of characters (0x40, 0x5b -
  40. 0x53, 0x60, and 0x7b-7e) were  designated as "National or
  41. application-oriented graphic characters".  This means that any nation
  42. can have a national standard that specifies the meaning of these
  43. characters as well as individual applications can define them as they
  44. wish.  Also, character 0x23 is allowed to be defined as either the
  45. (British) pound sign or the number sign, and 0x24 is allowed to be
  46. defined as either the (US) dollar sign or a generic currency symbol. 
  47. In the USA, the ASCII standard defines these characters as commercial
  48. at (@), left square bracket ([), reverse slant (\), right square
  49. bracket (]), circumflex accent (^), grave accent (`), left curly brace
  50. ({), vertical line (|), right curly bracket (}), tilde (~), number sign
  51. (#), and dollar sign ($).  Other nations have similar national
  52. standards that define these characters quite differently.
  53.  
  54. X3J11 felt that it was important, if the C Standard was to be an
  55. international standard, to be able to write a C program using only
  56. those characters that were guaranteed to exist -- those characters
  57. defined in ISO 646 that are NOT redefinable.  We also felt that it was
  58. important to be able to convert to and from that notation very easily;
  59. in particular, it should be possible to do the conversion without
  60. having to parse the C program so that a simple text substitution (e.g.
  61. a sed script) is sufficient to convert back and forth.  We tried to
  62. come up with digraphs, but there aren't enough to meet these criteria. 
  63. Thus, trigraphs.  Our thoughts at the time were that trigraphs would be
  64. most useful for moving programs from one environment to another; we
  65. assumed that most systems had *some* way to represent these characters
  66. that would be used locally, although trigraphs could be used there as
  67. well.  And, of course, a user is always free to create a header with
  68. macros for the difficult characters and use those instead (although
  69. that won't work inside character or string literals).  X3J11 recognized
  70. that trigraphs were a bad solution to a vanishing problem, but it *is*
  71. a problem and there didn't seem to be any better solutions.
  72.  
  73. At the same time that X3J11 was finishing up the ANSI C Standard, ISO
  74. began work on an International Standard for C as Working Group 14 under
  75. Subcommittee 22.  The Danish delegation remarked that they did not, in
  76. fact, have a way of representing those characters on their terminals,
  77. trigraphs were ugly, and they would like some better method.  What they
  78. proposed was a collection of digraphs and keywords.  X3J11 examined
  79. their proposals and pointed out a number of objections, both technical
  80. and aesthetic, pointed out that trigraphs were a solution to the
  81. problem, and declined to make any changes to the (draft) ANSI Standard.
  82. The Danes then revised their proposal and the cycle repeated a number
  83. of times.  Eventually the ANSI C Standard was approved as it appears
  84. today and the ISO C Standard was also approved with identical technical
  85. content for expediency although a number of delegations had issues that
  86. they wanted to have addressed via normative addenda later.
  87.  
  88. Now, it's later.  Denmark has brought a number of proposals to WG14,
  89. asking for approval as a normative addendum.  X3J11 in it's role as
  90. Technical Advisory Group to the US delegation has continued to advise
  91. against adopting any of the proposals both because of technical
  92. conflicts and because we do not believe that they add any significant
  93. value to the C language.  In the meantime, however, both ANSI and ISO
  94. have also started projects to standardize C++, the Danes made a similar
  95. proposal to those committees, and it has been accepted.  SC22, the
  96. parent committee of both the C and C++ working groups, has resolved that
  97. the Danes' concern be addressed and further charged both working groups
  98. with avoiding gratuitous incompatibilities between C and C++.  At the
  99. meeting last week, X3J11 finally gave up and recommended that the US
  100. vote to accept the current Danish proposal as a proposed normative
  101. addendum to the ANSI/ISO standard.  The substance of that proposal
  102. should be fairly obvious from Doug's posted implementation.
  103.  
  104. If you think this is a crock, then what we need to do is to get it shot
  105. down by a wide variety of countries at the ISO SC22 level rather than
  106. having the big bad USA picking on poor little Denmark which is how some
  107. people have viewed X3J11's objections.  For additional information, I
  108. suggest you contact the chair of WG14, P. J. Plauger (pjp@plauger.com).
  109. ----
  110. Larry Jones, SDRC, 2000 Eastman Dr., Milford, OH  45150-2789  513-576-2070
  111. larry.jones@sdrc.com  or  ...uunet!sdrc!larry.jones
  112. Let's just sit here a moment... and savor the impending terror. -- Calvin
  113.