Only with reference to the last bit, or some of the other statements too ?
Do you have a feel for how widely these guidelines are actually followed ?
The fundamental arrogance in the C++ Standard was thinking that
it could usurp the central role of the C headers in a typical
implementation. To conform fully to the C++ Standard, an
implementation effectively has to make <cstdio> the fundamental
header. It declares all names within namespace std. The newly
demoted <stdio.h> then would do much as Chuck says: include
<cstdio> and then hoist each declared name individually into
the global namespace with a separate using declaration. (You
can't use an omnibus declaration to hoist all the names at once,
for a variety of reasons. But that's just a nuisance for the
implementor.) As icing on the cake, the C++ Standard then puts
the world on notice that headers like <stdio.h> will one day go
away, because they're deprecated.
This is nonsense. As several of us vendors repeatedly warned the
C++ committee, the C headers are and will long remain the true
fundamental headers describing the Standard C library component
of the Standard C++ library. A gazillion technical, political,
and administrative reasons combine to keep most C++ implementations
from fully conforming to the C++ Standard in this regard. The
common practice is to leave the C headers alone (aside from a bit
more crud wrapped in #ifdef __cplusplus/#endif envelopes.) Instead,
<cstdio> includes <stdio.h> and hoists names from the global
namespace into namespace std. The differences in effect can be
kept small, with a not-unreasonable coding style, but they're there.
And they're one more reason (besides export templates) why many
implementations can't claim 100 per cent conformance to the C++
Standard.
FWIW, a couple of libraries do meet these requirements. Metrowerks
and RogueWave as shipped with Solaris C++ are two that spring to
mind. The Dinkumware libraries can be configured to fully
conform, but interestingly enough many of our OEM compiler vendors
still choose not to. Libraries like libstdc++ (shipped with gcc)
and STLport are dependent on underlying C libraries supplied by
others, so they can't fully conform. Needless to say, those
underlying C libraries seldom supply even the simple additions
required by the C++ Standard, much less accommodate draconian
restructuring for namespaces.
I also don't like the loss of the .h suffix on C++ headers. Too
many tools exist that are inconvenienced, to say the least, if
there's no *.xx for some xx to identify groups of files. But
that's another battle I lost.
P.J. Plauger
Dinkumware, Ltd.
http://www.dinkumware.com