jsh@usenix.org (Jeffrey S. Haemer) (10/03/90)
Submitted-by: jsh@usenix.org (Jeffrey S. Haemer) An Update on UNIX1-Related Standards Activities October 3, 1990 USENIX Standards Watchdog Committee Jeffrey S. Haemer <jsh@usenix.org>, Report Editor X3J16: C++ Mike Vilot <mjv@objects.mv.com> reports on the July meeting in Seattle, Washington: Standard C++? The C++ programming language has been gaining popularity at a remarkable rate (an informal estimate is that the C++ population doubles every nine months). One reaction to the growing popularity has been a call to stabilize the language's definition, and achieve some consistency across implementations. C++ is popular enough that larger corporations are considering adopting it as an officially endorsed development language -- but some cannot make such a move unless the language is defined by a standard. For these and other reasons, the ANSI secretariat agreed to establish the X3J16 committee to formulate a standard for C++. Dmitry Lenkov, of HP, made the official proposal, and serves as chairman of the committee. To date, X3J16 has met three times: an organizational meeting last December, the first technical meeting in March to get organized, and a meeting in July to really get started. The December meeting, in Washington D.C., was purely administrative: over 50 attendees received lectures and tons of paper on X3 rules and procedures. The highlight of the day was an invited presentation by Bjarne Stroustrup on ``the spirit of C++.'' The transcript is available as committee document X3J16/90-0022 or from Greg Comeau at Comeau Computing, 91-34 120th Street, Richmond Hill, NY 11418, (718) 849-2355. March meeting AT&T hosted the meeting in New Jersey. Most of the week was spent on administrative matters, while the group got organized and accustomed to The Bureaucratic Way. Since most of the members are engineers, the highlight of the week was the evening technical sessions on implementing exception handling for C++. (The week was sort of a __________ 1. UNIXTM is a Registered Trademark of UNIX System Laboratories in the United States and other countries. October 3, 1990 Standards Update X3J16: C++ - 2 - mini-Usenix conference, as most members had gone without a substantial C++ gathering since the October '88, Denver conference.) The week's major activities were discussing and preparing a goals document, describing the committee's activities and priorities. Goals Here is a brief outline of the goals document, which is available as X3J16/90-0023: 1. Base documents: C++ Reference Manual, ANSI C (ANS X3.159-1989), ISO C when available. 2. Standardize syntax and semantics of the language as a token sequence without the presence of preprocessing directives. 3. Define and standardize a minimum set of C++ libraries, their contents, and interfaces. 4. Standardize elements of a C++ environment. 5. Consider proposed major changes: parameterized types and exceptions. 6. Ensure that the standard is suitable for the international community. 7. Ensure a very high level of compatibility with ANSI C. 8. Establish coordinating liaisons with X3J11 (ANSI C) and Numerical C Extensions Group. 9. Produce two deliverables: draft proposed standard and rationale. 10. Priorities: - clear & unambiguous - C++ reference manual - other base documents - consistency - user/implementer experience - portability, efficiency, expressiveness - ease of implementation (including translation to C) October 3, 1990 Standards Update X3J16: C++ - 3 - There was some confusion over the multiple base documents. Most members had seen the AT&TT C++ version 2.0 reference manual, but in preparation for standardization, the language and its reference manual had suffered a number of subsequent, small changes. AT&T made the 2.1 reference manual available to X3J16; it was essentially the text of the book The Annotated C++ Reference Manual by Margaret Ellis and Bjarne Stroustrup published by Addison-Wesley (minus the annotations). My naive suggestion to remove the ANSI C standard as a base document in favor of a single base provoked the most intense and emotional discussion of the week. At stake was compatibility between C++ and C. While most members of X3J16 feel that the existence of a separate committee implies the standardization of a new language, some former members of X3J11, which just finished the C standard, want to eliminate any and all incompatibilities with C. (There was even a threat to sabotage the C++ standard in balloting if they are not removed.) This issue is obviously important and has two sides. Make your preferences known to the committee. For detailed reference material, both ``C++: As Close as Possible to C -- But No Closer,'' (Bjarne Stroustrup and Andy Koenig, The C++ Report, 1(7), 1989) and Chapter 18 of The Annotated C++ Reference Manual document and explain differences and incompatibilities between the languages as they stand today. Focusing on a language without preprocessing directives continues the de-emphasis of the C preprocessor. This is particularly favored by C++ vendors looking into more powerful development environments. [Editor: Admittedly, improper preprocessor use can sink us in deep and dirty bath water, but let's make sure to save the baby. When writing portable C, I personally find #ifdefs extremely valuable; I suspect they will remain valuable in C++, and I would hate to see the working group neglect this valuable porting tool.] The libraries effort includes asking what to do about the ANSI-C library, and investigating what can be standardized in a more C++-like approach. The environment work addresses the linking and executing of C++ code with non-C++ code (i.e., linkage and program execution models), rather than development environment tools. There are thousands of suggested ``improvements'' proposed as extensions to C++, but there is consensus on two named in the goals document: parameterized types and exception handling. Their proposals are detailed, and both have been implemented (in some form) in a few C++ implementations. The emphasis on international concerns reflects the lessons learned from the difficulties of C standardization. X3J16 has some fences to October 3, 1990 Standards Update X3J16: C++ - 4 - mend, particularly in the international community. Rather than waiting until the last minute to spring a standard on the ISO, the C++ committee is involving itself with the international community right from the start. July meeting Microsoft hosted the second, Seattle meeting. Sub-groups focused on the key topics listed in the goals statement began work at the March meeting, and reported their progress in Seattle. International Concerns Steve Carter, of Bellcore, presented the major International Concerns (particularly character sets and formal specification) and asked the other groups to work on these issues. He also suggested various sites overseas where future X3J16 meetings could help cooperation with international standardization efforts. Editorial Jonathan Shopirio, of AT&T, presented the Editorial group's proposal for organizing and formatting the standard. Jon is also working on an abstract machine model, and a way to define the semantics in the standard precisely and consistently. Formal Syntax James Roskind, an independent consultant, presented the work of the Formal Syntax group. He has developed (and published on the net) a yacc-able grammar for C++, and is concerned about ambiguities in the the language. Most of the discussion was spent trying to discover whether C++ can (or should) be made LALR(1). Core Language Andy Koenig, of AT&T, presented the Core Language group's work. Initially, they identified and classified difficulties in the working document. Environment John Vasta, of HP, presented the work of the Environment group. A key issue addressed by this group is the interaction of C++ with other programming languages. Among the important topics are linkage of C++ and non-C++ translation units, especially the construction and destruction of static C++ objects. Libraries I presented the Library group's work. There were many suggestions, from both inside and outside of the committee. (Interested outside suggesters were James Coggins, Keith Gorlen, and Doug Lea, who have each developed large C++ libraries.) A few people noted similarity with topics covered by other standards October 3, 1990 Standards Update X3J16: C++ - 5 - (notably POSIX). Initially, the library group will focus on a few commonly-used components. Parameterized types and exception handling will significantly effect the way we design libraries in C++. Language Extensions Bjarne Stroustrup, of AT&T, presented the work of the Extensions group, which was by far the most active. The technical sessions presented experience with implementation and use of the template facility. The most active and emotional debate of the week was on exception handling, discussing the proposal outlined by Andy Koenig and Bjarne Stroustrup in their paper ``Exception Handling for C++'' presented at the Usenix C++ conference in April. Martin O'Riordan, of Microsoft, and Mike Miller, of Glockenspiel, presented arguments in favor of extending the current proposal (which defines termination semantics for exceptions) to include resumption semantics. Andy and Bjarne explained their reasons for not including resumption -- the most important was the complexity and cost of implementation. To their credit, the group worked hard to find a proposal that provided both kinds of exceptions with acceptably small time/space overhead. However, at the end of the week, Bjarne declared the debate deadlocked, and refused to impose his proposal while substantial disagreement remained. This is another topic where you should make your opinions heard. C Compatibility Mike Miller presented the work of the C Compatibility group. Tom Plum, of Plum-Hall, produced a list of every section of the C++ reference manual that was not C. Much of the group's near-term activity will be devoted to explaining the many items on the list. The Seattle meeting produced tangible progress on the language standard. X3J16 voted to accept the proposed document outline and format. They also agreed to incorporate the template proposal (the text from Chapter 14 of The Annotated Reference Manual, minus the annotations -- it was literally a scissors-and-tape job). We hope C++ vendors will regard templates as now officially in the language, and provide users an opportunity to work with this feature. Next events A few substantial issues lie ahead. The next meeting should see some resolution on the exception proposal. We should see some progress on the review of language ambiguities and inconsistencies, and have some idea of how difficult it will be to ANSIfy the document. We should also see some specific proposals on library contents. The most October 3, 1990 Standards Update X3J16: C++ - 6 - substantial will be a simplified version of iostreams by Jerry Schwarz (now at Stardent, formerly at AT&T). Our target date for delivering a draft standard is the end of 1992. X3J16 meets three times per year. The next three meetings (and their hosts) will be: + November 12-26, Cupertino CA (Hewlett Packard) + March 11-15, Nashua NH (Digital) + June 17-21, Lund Sweden (Lund Institute of Technology) Membership on an X3 committee is open to any individual or organization with expertise and material interest in the topic addressed by the committee. The cost for membership is $250. Contact the chair or vice chair for details. Chair: Dmitry Lenkov HP California Language Lab 19447 Pruneridge Avenue MS 47 LE Cupertino, CA 95014 (408)447-5279 FAX (408)447-4924 email dmitry%hpda@hplabs.hp.com Vice Chair: William M. Miller Glockenspiel, Ltd P.O. Box 366 Sudbury, MA 01776-0003 (508)443-5779 email wmmiller@cup.portal.com October 3, 1990 Standards Update X3J16: C++ Volume-Number: Volume 21, Number 174
pc@hillside.co.uk (Peter Collinson) (06/26/91)
Submitted-by: pc@hillside.co.uk (Peter Collinson) USENIX Standards Watchdog Committee Stephen R. Walli <stephe@usenix.org>, Report Editor Report on X3J16: C++ Mike Vilot <mjv@objects.mv.com> reports on the March, 1991 meeting in Nashua, New Hampshire: Current Status The ANSI X3J16 committee began its second year of technical meetings. As expected, the work grew more detailed, with the Core Language and Environment working groups being the focus of most of X3J16's work. March meeting Digital Equipment hosted the Nashua meeting. The week's major activities focused on understanding the myriad details of the proposed clarifications and changes to the current working document. X3J16's sub-groups focused on the key topics listed in the goals statement developed at the March, 1990 meeting. They worked by electronic mail between meetings, and reported their progress. International Concerns Steve Carter, of Bellcore, presented the major international concerns. Due to the concerns expressed at the November meeting about conversion to a Type I (international) X3 process, Steve came prepared with material explaining the implications of the change. To all appearances, the change seems benign to the technical work of the committee. The change would have the positive effect of getting international involvement. It has the potential to delay the development of the standard, due to the need to synchronize U.S. and ISO balloting. The full X3J16 committee almost decided to vote to adopt the change, but ran out of the quorum necessary to pass the motion on Friday morning. Editorial Jonathan Shopiro, of AT&T, presented the Editorial group's work. The most significant change from the November version was the incorporation of the exception handling proposal. Jonathan also described an editorial change that simplified the treatment of names and name lookup, merging the concepts that had previously been treated under the topics of dominance and name hiding. Martin O'Riordan, of Microsoft, questioned whether this was a purely editorial change, or a change to the language semantics. Martin and others reqeusted time to look over the change before agreeing to it. As I mentioned last time, the person who volunteered to edit the Rationale document has not been heard from since last summer. Susan Waggoner, of USWest, has taken on that responsibility. Formal Syntax James Roskind, an independent consultant, presented the work of the Formal Syntax group. The bulk of the discussion concerned a proposal by Reg Charney of Program Conversions, Inc. to rename the non- terminals in the grammar. Although there was much discussion about the virtues of regularizing the naming versus the evils of gratuitous changes, the committee decided, in the end, to adopt the proposal. Eric Krohn, of Bellcore, presented the syntactic ambiguities involving the newly-adopted throw-expression syntax for exceptions. The discussion clarified the issues, and a final resolution is likely next meeting. Tom Penello, of Metaware, gave an interesting presentation on the inherent problems with ambiguous grammars. He established the fact that an ambigous grammar makes the question of a conforming implementation undecidable. He also illustrated that arbitrary rules to resolve grammatical ambiguities has the side-effect of rejecting valid programs. He then went on to explain the syntactic ambiguities of the template syntax, arising from the conflict over using the ``>'' symbol as both a relational operator and a template argument list delimiter. Although he proposed a grammar rewrite that solved the problem, he decided not to recommend it on aesthetic grounds. There seems to be an appreciation within X3J16 as a whole for the technical issues involved in making the grammar correct. There also seems to be a sentiment in favor of letting the semantic rules settle most of the complex issues. Core Language Andy Koenig, of AT&T, presented the Core Language group's work. Document X3J16/91-0005 describes the group's discussion about the linkage of typedef names and anonymous classes. The group decided it was an Environmental issue, and handed it off to the Environment group. The group discussed objects created under a condition, and resolved to consider those objects governed by an implicit block scope, as if the programmer had explicitly supplied a compound statement. Discussion is summarized in X3J16/91- 0021. Document 91-0019 covers the discussion of lifetimes for temporary objects created by the compiler. This issue has not reached closure, although the issues were clarified. Environment Peter Chapin, of Vermont Technical College, presented the work of the Environment group. Document X3J16/91-0011 describes the group's discussion about C/C++ compatibility issues. This discussion is continuing. The group discussed at length the one definition rule - enforcing the rule that a program must have exactly one definition for a given function, even in the presence of multiple inclusions of inline functions and the potential need for the compiler to generate such functions out of line. Document X3J16/91-0024 summarizes the discussion. There is a proposal to include a section in the standard on required warnings. Laura Yaker, now at Mentor Graphics, presented some ideas of the sorts of things that might be considered as required warnings. The discussion indicated that this is a difficult issue to standardize, since there is so much variation in environments and implementations. This ongoing discussion is summarized in X3J16/91-0014. Another ongoing discussion concerns static initialization order for objects in different translation units. Document X3J16/91-0012 summarizes this discussion. There was some discussion on specifying translation limits in the standard. The discussion seemed to generate more heat than light, and nothing was decided. Lastly, the linkage of types discussion continues, and is summarized in X3J16/91-0023. Peter described several alternate rules to insure type-safe linkage of types. A central issue is whether the linkage specification is part of the type. There are interesting arguments for and against this. Libraries I presented the Library group's work. There has been some progress on formulating proposals for submission to X3J16. Aron Insinga of DEC presented his proposal to apply templates to the definition of the standard string class. His progress has been slowed by the lack of an available implementation supporting templates. Steve Clamage of TauMetric presented proposed resolutions for almost all of the compatibility issues regarding the C library. Most of the small type insecurities can be handled in a reasonably straightforward manner. There are more substantial issues regarding signals, exceptions and the facilities provided by longjmp(). The iostreams proposal continues to receive comment. Many of the UNIX-specific issues have been removed. Addressing these concerns raised an interesting point - should the C++ standard adopt the practice of the C standard, in describing only that certain 'types' exist, or should it describe them as classes and specify their required operations? There was some concern that describing classes would be inefficient, but other concerns that the vague wording without a class description would introduce too much variability among implementations. Language Extensions Bjarne Stroustrup, of AT&T, presented the work of the Extensions group. The group is working through a long list of proposals for changes to the language. A significant number of them came from the Core language group, due to an evaluation of what Andy Koenig calls for changing the wording of the standard would have the effect of changing the meaning of the language. The current list of language extension proposals includes overloading of the ``.'' operator, a proposal for handling national character set issues with digraphs and new keywords, and the adoption of the ``inherited'' keyword (as in Apple's implementation). The largest issue lurking in the Extensions category is the addition of support for run-time type information. There will be much discussion on this topic over the next months. C Compatibility Tom Plum, of Plum-Hall, presented the work of the C Compatibility group. The group continued its investigation of the vocabulary differences between C and C++. They decided to categorize their efforts into groups, covering the language, environment, and library. One likely outcome of their work will be a proposal to adopt the same model of sequence points used by X3J11. Next events The next three X3J16 1991 meetings (and their hosts) will be: o June 17-21, Lund Sweden (Lund Institute of Technology) o November 11-15, Toronto Canada (IBM) o March 1992, Austin TX (TI) Zortech announced plans to host one of the other two 1992 meetings in London. Membership on an X3 committee is open to any individual or organization with expertise and material interest in the topic addressed by the committee. The cost for membership is $250. Contact the chair or vice chair for details. Chair: Dmitry Lenkov HP California Language Lab 19447 Pruneridge Avenue MS 47 LE Cupertino, CA 95014 + 1 (408)447-5279 FAX: +1 (408)447-4924 email dmitryhpda@hplabs.hp.com Vice Chair: William M. Miller Glockenspiel, Ltd P.O.Box 366 Sudbury, MA 01776-0003 +1 (508)443-5779 email wmmiller@cup.portal.com Volume-Number: Volume 24, Number 24