Topic: STL FAQ, Update 5/22/95
Author: "Ronald F. Guilmette" <rfg@rahul.net>
Date: 1995/05/26 Raw View
In article <3ps268$8je@ixnews4.ix.netcom.com> you write:
>UPDATE: New material has ** in left margin.
>
> anonymous ftp via butler.hpl.hp.com
> works with Borland 4.5 and IBM
> also includes something on hash tables not in STL by Bob
> Fraley
> no support included
>
> STL++: Modena Software at 1-800-MODENA-1
> works with Borland, IBM C Set++, Apogee, Visual C++ 2.0
> (this last has some limitations.)
> comes with tutorial, you can get the tutorial separately
> (read this tutorial after A. Stevens and after playing
> with ObjectSpace examples.)
I wish you to note that I object strongly to your misuse of the comp.std.c++
to post blatant advertisments for the products of one of my competitors.
Please do not do it again. This is not directly relevant to discussions
of the fine points of the standard. This sort of material belongs in one
of the *forsale* newgroups, but not in comp.std.c++.
If comp.std.c++ is going to degenerate into a market/bazzar as well as the
circus it has recently become, then please be prepared to endure *my*
advertisments, as well as any that you see fit to post.
--
-- Ron Guilmette, Sunnyvale, CA ---------- RG Consulting -------------------
---- E-mail: rfg@segfault.us.com ----------- Purveyors of Compiler Test ----
---- finger: rfg@rahul.net ----------------- Suites and Bullet-Proof Shoes -
Author: mcorcora@ix.netcom.com (Marian Corcoran)
Date: 1995/05/23 Raw View
UPDATE: New material has ** in left margin.
1. Look for STL Web pages with some intro material.
2. Look for experiences from Lockheed. Software professionals with
just some coursework in C++ there got simple programs working just a few
hours after starting.
3. There are, of course, different levels of working with STL. I am
giving a course in it in Silicon Valley starting in the summer time,
starting June 27. (contact me if interested).
Of special note: A major complaint about libraries that programmers
have is that you don't get the source. Well, with STL, you get the
source.
I have put together four articles for the STL FAQ:
1. Sources and References of STL (M. Corcoran).
2. Report from Lockheed on their first experiences with STL.
3. On using MODENA by Edgar Crisostomo (along with some needs in
education that he sees for STL)
4. Comparison of Modena and ObjectSpace by Mike Lindner.
REQUEST FOR OTHER MATERIAL If someone has other material or experiences
to include you may e-mail them to me and I will add them. Especially of
interest would be examples of STL that you may have developed as you
learn STL or industrial applications. Please state whether I may use
your article in the FAQ and whether I may use your name.
Marian
**********************************************************************
Annotated Sources and References of STL by Marian Corcoran
1. Where does one get the STL?
anonymous ftp via butler.hpl.hp.com
works with Borland 4.5 and IBM
also includes something on hash tables not in STL by Bob
Fraley
no support included
STL++: Modena Software at 1-800-MODENA-1
works with Borland, IBM C Set++, Apogee, Visual C++ 2.0
(this last has some limitations.)
comes with tutorial, you can get the tutorial separately
(read this tutorial after A. Stevens and after playing
with ObjectSpace examples.)
STL<ToolKit>:ObjectSpace at 1-800-OBJECT-1
most C++ compilers
code is well documented
*comes with tutorial with over 200 elementary examples that
have just been placed in the public domain
available
via anonymous ftp via butler.hpl.hp.com at
/stl/examples.Z or .zip for PC
These examples are a good place to start.
** RogueWave to include STL, coming out in Sept.
2. References (these are the ones I know about):
**NEW** STL Web Pages http://weber.u.washington.edu/~bytewave_stl.html
**Intro material including Stepanov Speaks on STL in C++ (M. Corcoran),
** Dr. Dobbs article (A. Stevens), STL newbie notes (M. Khan),
** STL by Stepanov & Lee, STL files, and ANSI C++ Draft (HTML version)
A. Koenig. File iterators. Journal of Object-oriented Programming
(JOOPS), Nov/Dec 1994
A. Koenig. Generic iterators. JOOPS, Sept. 1994
A. Koenig. Templates and generic iterators. JOOPS, June 1994
A. Koenig. ? . January , 1995
--intermediate level material
D.R. Musser and A.A. Stepanov. Algorithm-oriented generic libraries.
Software-Practice and Experience, July 1994
A.A. Stepanov and M.Lee. The Standard Template Library. ISO
Programming Language C++ Project. Doc. No. X3J16/94-0095, WG21/N0482,
May 1994. (Look in HP's ftp for stl.doc, I believe). Although it is the
"definitive" STL, it is not intro material.
* A. Stevens. He has an interview with Stepanov in Dr. Dobb's
Journal, March 1995. This is an excellent conceptual introduction to
the STL, also a good place to start.
* A. Stevens. The Standard Template Library (with some code) ,... in
his column, Dr. Dobb's Journal, April 1995. Also good intro material.
B. Stroustrup. Making a vector fit for a standard. C++ Report, Oct.
1994.
--intermediate level material. Stroustrup made some important
contributions to the design of STL, discussed here.
* M.J. Vilot. An introduction to the standard template library.
C++ Report, Oct 1994.
-- You might want to read Stevens first.
Also see
http://www.cs.rpi.edu/~musser/stl.html
This material is also available via anonymous ftp
ftp.cs.rpi.edu in directory pub/stl the file stl-info.ps.Z
includes STL Online Algorithm Reference by R. Cook,
D. Musser, and K Zalewski with examples.
See ObjectSpace examples first.
************************************************************************
**EXPERIENCES FROM LOCKHEED
**
**We've just obtained STL<ToolKit> for use with our HP cfront compiler
**and the Softbench development environment. Here are the first
**impressions & observations:
**Apparently ObjectSpace doesn't routinely deliver 4mm DAT tapes and
**added $25 to do it. The tape we recieved was DOA (unreadable) but the
**ObjectSpace support folks quickly e-mailed the TAR-file and we were in
**bussiness. We did not experience the problems reported by Mike Linder
**contacting the ObjectSpace people. The above problem was solved within
**two hours.
**Our experience with installing and building the libraries supports
**Mike Linder's observations. Good job here by the vendor.
**Compiling with the debug option (-g) resulted in many warnings similar
**to the following:
**CC: "release1.C", line 28: warning: debug.emit_type_entry:typedef node
**has no symid_ptr: vector <X*> ::size_type (187)
**CC: "release1.C", line 28: warning: debug.emit_type_entry:typedef node
**has no symid_ptr: vector <X*> ::const_reference (187)
**The executable does run and the debugger still works, however.
**Note that the person evaluating STL<ToolKit> is not an experienced C++
**programmer and is proceding on the strength of a C++ class. His first
**impressions of the ObjectSpace documentation are favorable and he was
**able to write a simple program from a standing-start in a few hours.
**We also have the documentation from HPs public-domain STL. I'll keep
**you posted.
**If you think our STL experiences will be of interest, I have no
**problem with including them in the FAQ at some point.
************************************************************************
ON USING MODENA
> We use Modena
> >STL++ v2.0 - they respond fairly quickly to our needs, they add bug
> >fixes or compiler support for our Unixware 2.0 SDK C++ compiler, and
> >they answer our many technical questions.
> >--
The STL++ Manual has a "Files" Heading at
the top of each component description, and that is all that should be
explicitly #included to use that component (mutual independence).
When I #include <vector.h>, it pulls in all the other dependent
includes. It is not explicitly stated, but for C-like arrays, you
#include <algobase.h>.
There are minor problems, I will report to Modena (example: hashfun.h
has non-template function _definitions_, so you get multiply defined,
when used over several translation units. To improve the ability (for
us) to specify manual template instantiation, it would be nice if they
factor out the non-inline template definitions into another file.
EDUCATIONAL HINTS
A discussion of build issues would be useful. Especially since STL
template code can have really obscure compiler messages with todays
compiler technology. There are also issues with debugging template
code.
A discussion of when to pass container by reference, versus passing
iterators would be useful.
> >Edgar Crisostomo 408-492-6528, edgar@clipper.robadome.com
> >Systems Software, Siemens Rolm Communications, Inc. FAX 408-492-3305
> > ==== "Darmok and Jhilad at Tanagra, ====
> > ==== Shaka when the walls fell. " ====
**********************************************************************
Comparison of Modena And ObjectSpace by Mike Lindner
I just bought STL++ from Modena and STL<toolkit> from ObjectSpace, for
purposes of comparison. So far I have not had a chance to use either
extensively, but I have the following observations:
- Modena was very helpful on the phone, and responded quickly to
whatever
I called about. The initial floppy they sent me was bad, and they
replaced it overnight. In every case but one technical question, the
person who answered the phone was able to do everything I needed. In
the remaining case, I received a call back within hours of my
question. I like their service.
ObjectSpace had an operator, who directed me to the one salesperson,
who
was always "out of the office" when I called, and who was the only one
whoc could sell me the product (it took 5 days just to order the
product, because I couldn't get in touch with her).
- Both products come as source, and you must build the libraries
yourself. The documentation for doing this from Modena was
sketchy, and it wasn't until I called tech support that I discovered I
had to change some files by hand to make them compile with my compiler
(which is one of the one's they advertise as working with).
ObjectSpace, on the other hand, has a neat little config package that
tests what your compiler can do, and writes a header file which
configures the code to be correct for your compiler (lots of
preprocessor magic in them there header files). It was a joy to use.
- So far, the test programs I have compiled are much smaller when I use
the ObjectSpace libraries than with the Modena libraries. As I said,
I have not stressed either product, so these numbers may not reflect
use in an actual application.
- As for conformance, ObjecSpace doesn't necessarily support everything
in STL, but only as much as they can squeeze out of the compiler you
give them to work with. Is that good or bad?
- The ObjectSpace library claims to be "thread safe", although I haven't
tried that our yet. Apparently they have a wrapper class that behaves
like a smart pointer, but can be locked for reading or writing. They
also have some other platform independent thread and mutex code.
The Modena folks said their library is not "thread safe", but only in
one place, and they would gladly show me how to modify the source to
add that feature. One of my compiler vendors says they'll be shipping
Modena with their compiler soon, and their version will be thread
safe.
- Modena includes some extra goodies, like hash tables and an ANSI
string class.
- Oh, and it looks like ObjectSpace requires perl to run the config
program.
--
Mike Lindner
mikel@attmail.com
mpl@cmprime.attpls.com
mpl@pegasus.att.com