Re: .h for standard headers
"Old Wolf" <oldwolf@inspir e.net.nz> wrote in message
news:843a4f78.0 405192221.53739 e0e@posting.goo gle.com...
[color=blue]
> "Tim Clacy" <nospamtcl@nosp amphaseone.nosp amdk> wrote:[color=green]
> > Christopher Benson-Manica wrote:[color=darkred]
> > > At what point was the .h dropped from the STL headers? I just had a
> > > discussion yesterday with my boss, who said he wanted .h on all the
> > > STL includes, despite me protesting that it was not standard...[/color]
> >
> > Presumably the idea of omitting an extension was thought up by someone[/color][/color]
who[color=blue][color=green]
> > doesn't use Windows; we have lost the conveniences of double clicking to
> > open and meaningful icon associations in one fell swoop.[/color]
>
> Whatever. The instruction
>
> #include <iostream>
>
> means that the functions and objects which form part of the iostream
> library (as defined by the Standard) are now in scope (etc. etc. etc.)[/color]
Uh, yes. But what does that have to do with omitting the suffix?
[color=blue]
> There does not have to be any file "iostream", and in fact, the
> implementation does not even have to have a filesystem.[/color]
True. That was a principle we introduced with the C Standard, and
I ensured that it was picked up by the C++ Standard. But *in the
real world* headers are real live files almost all the time,
and some of us are continually grepping them, or copying them,
or doing all sorts of other things where we'd like to name them
as a group. That's not so easy any more.
[color=blue]
> On my Windows system there is in fact only the file "iostream.h ",
> which gets included when you issue the above instruction,[/color]
It's actually a preprocessing directive, FWIW. You must have an
unusual compiler, because all the ones I use on Windows consider
iostream.h to be the pre-standard legacy version of iostreams.
The file iostream is the one that gets read by the include you
show above.
[color=blue]
> and I can
> still do the double-click trick (which, incidentally, I almost never
> do, since I use a shell with tab completion).[/color]
I'm happy for you. Doesn't diminish the problem that others have
stated here, however.
P.J. Plauger
Dinkumware, Ltd.
"Old Wolf" <oldwolf@inspir e.net.nz> wrote in message
news:843a4f78.0 405192221.53739 e0e@posting.goo gle.com...
[color=blue]
> "Tim Clacy" <nospamtcl@nosp amphaseone.nosp amdk> wrote:[color=green]
> > Christopher Benson-Manica wrote:[color=darkred]
> > > At what point was the .h dropped from the STL headers? I just had a
> > > discussion yesterday with my boss, who said he wanted .h on all the
> > > STL includes, despite me protesting that it was not standard...[/color]
> >
> > Presumably the idea of omitting an extension was thought up by someone[/color][/color]
who[color=blue][color=green]
> > doesn't use Windows; we have lost the conveniences of double clicking to
> > open and meaningful icon associations in one fell swoop.[/color]
>
> Whatever. The instruction
>
> #include <iostream>
>
> means that the functions and objects which form part of the iostream
> library (as defined by the Standard) are now in scope (etc. etc. etc.)[/color]
Uh, yes. But what does that have to do with omitting the suffix?
[color=blue]
> There does not have to be any file "iostream", and in fact, the
> implementation does not even have to have a filesystem.[/color]
True. That was a principle we introduced with the C Standard, and
I ensured that it was picked up by the C++ Standard. But *in the
real world* headers are real live files almost all the time,
and some of us are continually grepping them, or copying them,
or doing all sorts of other things where we'd like to name them
as a group. That's not so easy any more.
[color=blue]
> On my Windows system there is in fact only the file "iostream.h ",
> which gets included when you issue the above instruction,[/color]
It's actually a preprocessing directive, FWIW. You must have an
unusual compiler, because all the ones I use on Windows consider
iostream.h to be the pre-standard legacy version of iostreams.
The file iostream is the one that gets read by the include you
show above.
[color=blue]
> and I can
> still do the double-click trick (which, incidentally, I almost never
> do, since I use a shell with tab completion).[/color]
I'm happy for you. Doesn't diminish the problem that others have
stated here, however.
P.J. Plauger
Dinkumware, Ltd.
Comment