Topic: STL.H - where is it?
Author: cjthomas@sparco.objectSpace.com (Chris Thomas)
Date: 1995/05/05 Raw View
In article <3o68c0$5oq@offas_dike.sbil.co.uk> shepherd@debussy.sbi.com (Marc Shepherd) writes:
The examples found at the standard FTP sites were written by a company
called ObjectSpace, who also publish their own version of STL (which is
not available via FTP, because they want you to *buy* it.) Evidently,
in their implementation, all of the STL can be pulled in by including a
single header file, stl.h. By contrast, in HP's public-domain implementation,
the STL is broken out into a bunch of *smaller* headers.
Incidentally, ObjectSpace's idea of having just one header file for all
of STL is positively looney. Why include all that muck in every module,
when you're probably using only a small percentage of it? The ANSI committee
evidently agrees, since it maintains the approach of multiple headers,
rather than just one.
---
Marc Shepherd
Salomon Brothers Inc
It should be noted that our implementation of STL completely supports the use of
selective header file inclusion, and nobody is forced to use the single stl.h
header. Many users do find the approach useful, however, and it is a practice
that is encouraged by MS Windows (windows.h) and IBM OS/2 (os2.h).
Personally, I tend to agree with your argument and prefer to include individual
header files as I see fit. But I don't see the crime in providing an alternative
interface for those with differing needs.
--
---
Chris Thomas mail: cthomas@objectSpace.com
"Cat - the other white meat." work: 214.934.2496
Author: shankar@sgi.com (Shankar Unni)
Date: 1995/05/04 Raw View
Marc Shepherd (shepherd@debussy.sbi.com) wrote:
> Incidentally, ObjectSpace's idea of having just one header file for all
> of STL is positively looney. Why include all that muck in every module,
> when you're probably using only a small percentage of it?
Aha. There's a very good reason, if you're using one of the (growing) group
of compilers that support "precompiled header files". Typically such
implementations work as follows:
if two compilation units share the same initial group of #includes, and
the same command-line -D, -I and -U flags (and whatever others can change
compilation semantics), then they can share the same precompiled header.
A precompiled header is simply a binary dump of a set of declarations
that can be read back very fast by the compiler.
For instance, in the version of the compiler we're working with (Edison
Design Group's C++ frontend), the readback of a precompiled header is
simply an mmap() of a file, and a tiny amount of bookkeeping; it's really,
really fast.
Borland and Microsoft do something along these lines as well.
Thus, it's conceivable to have a "kitchen_sink.h" that can be sucked in in
a matter of a few milliseconds of compile time.
The trick to all this is that the actual time spent generating code and
symbol information into the object files should not decrease dramatically.
So the compilers need to have some way of only emitting all this for a
declaration if it's "used" somewhere..
--
Shankar Unni E-Mail: shankar@sgi.com
Silicon Graphics Inc. Phone: +1-415-390-2072
URL: http://reality.sgi.com/employees/shankar
Author: shepherd@debussy.sbi.com (Marc Shepherd)
Date: 1995/05/02 Raw View
In article eel@keystone.intergate.net, scherrey@proteus-tech.com () writes:
>When going through the examples source code for the STL found in examples.zip
>at the standard ftp sites, I see a file called STL.H being constantly referenced yet
>this file does not exist anywhere that I know of. Can someone please send me a
>copy or tell me the contents of this header file?
The examples found at the standard FTP sites were written by a company
called ObjectSpace, who also publish their own version of STL (which is
not available via FTP, because they want you to *buy* it.) Evidently,
in their implementation, all of the STL can be pulled in by including a
single header file, stl.h. By contrast, in HP's public-domain implementation,
the STL is broken out into a bunch of *smaller* headers.
If you want to compile ObjectSpace's examples, you either have to create
your own stl.h (which in turn #include's all the other relevant headers),
or you have to figure out which header each example needs, and modify the
code accordingly. The latter is (of course) more work, but well worthwhile,
because you learn more by doing it that way.
Incidentally, ObjectSpace's idea of having just one header file for all
of STL is positively looney. Why include all that muck in every module,
when you're probably using only a small percentage of it? The ANSI committee
evidently agrees, since it maintains the approach of multiple headers,
rather than just one.
---
Marc Shepherd
Salomon Brothers Inc
mshepherd@mhfl.sbi.com The opinions I express are no one's but mine!
Author: scherrey@proteus-tech.com
Date: 1995/04/20 Raw View
When going through the examples source code for the STL found in examples.zip
at the standard ftp sites, I see a file called STL.H being constantly referenced yet
this file does not exist anywhere that I know of. Can someone please send me a
copy or tell me the contents of this header file?
thanx & later,
Ben Scherrey
Proteus Technologies, Inc.