Collected Comments on C++ Compiler/Feature Recommendations

Comments on
Interim Recommendations

Namespace

From various CDF users 10/2/96

An experiment, having used the prefix-style ``workaround'' for namespaces, may ultimately not wish to cut over to the new C++ namespace features even when they are available. It can be argued that the explicit prefix style improves readability by always making it clear where a given symbol comes from.

Response: We have weakened the suggestion about cutting over when all relevant compilers support namespace, presenting the means of changing as an available option instead of a firm recomendation.


From Pasha Murat (CDF) murat@fnal 10/30/96

Presence of the static variables (this is a nice feature, inherited, I believe, from Modila2) solves the practical part of the problem and makes the whole discussion mostly academic. This illustrates a very interesting feature of C++ syntax: C++ often provides *several* ways of doing the same thing, which sometimes is confusing.

Response: The technique refered to here is that of using static variables appearing within a class definition to achieve almost the same semantics (and almost the identical syntax) that the draft namespace functionallity provides. In fact, this trick has been suggested by respected authors, and the working group considered recommending this as a workaround for the lack of namespace in current compilers -- on the Interim Recommendations page, this is mentioned as "The best comprehensive workaround we saw." But a few minutes of discussion uncovered several subtle traps and limitations which we felt made this unsuitable as a replacement for namespace.
In this case, if there were an alternative way of doing the same thing in C++, the standards committee would have noted it and would NOT have added the namespace feature to the language.
(mf)


Libraries

From Pasha Murat (CDF) murat@fnal 10/30/96

Recomendations do not contain anything about how the libraries coming with different compilers comply with ANSI standard draft; in particular, use of STL in a large projects desires a special discussion.

Response: The Fermilab Physics Class Library Task Force will be dealing with this issue. We can say with assurance that STL will be part of the sanctioned libraries/utilities, so people should feel free to use it. I believe the present compilers handle templates at least well enough to compile the reference implementation of STL.
(mf)


Comments on
Proposed Compiler and Debugger Standards

(None as of 10/30/96)
This document is a product of the C++ Languages and Tools Working Group of the Fermilab Run 2 Computing Strategy Committee