On Sun, 2002-01-06 at 00:55, Ed Hill wrote: > I've used the STL a lot in the past (originally with the Rogue Wave STL > implementation on HP-UX and Suns and later with EGCS/GCC on Linux). > I've found that it can be *QUITE* painful to port STL code from one > compiler/library to another or even to a newer rev of the same > compiler/library. The reason is that different template libraries are > of varying complexity (using more or less template features) and they > tend to *really* exercise the compiler. So be careful! Stuff that I > wrote that worked well with the old HP aC++ and EGCS releases is now > very broken with the RH 7.x gcc (gcc "2.96"), with the more recent 3.x > gcc versions, and with other C++ compilers. And broken template code > just sucks to debug.
Unless you're writing STL code under windows using Visual C++ (which, btw, sucks for template support) you shouldn't have any problem using the STL. That may have been different in the past, but now that we have a standard and compilers are actually implementing it, there shouldn't be any problems. If there are, you can always uses the SGI STL... > In terms of STL docs, I've used B. Stroustrup's text (excellent), the > Rogue Wave HTML docs that come with their implementation (ok), online > docs from the SGI STL implementation (ok), and some more esoteric refs > (eg. Barton & Nackman's "Scientific and Engineering C++"). > I would highly, highly, highly, highly, highly, highly, highly recommend "The C++ Standard Library" by Josuttis (published by Addison Wesley). It is by far the best STL book I have ever seen (and I've looked at several, but not the latest version of Musser and Saini...) > If all you want are decent implementations of some data structures and > algorithms, then I strongly suggest that you look into something other > than the STL. Take a good look at the C-based Glib > > http://developer.gnome.org/arch/gtk/glib.html > > library which you can, of course, use within C++. Its *very* portable. > And most of the data structures and algorithms that you're likely want > are in there... > Yes, you can use glib in C++, but you lose way too much of the power of C++. Face it. Using C code when you could use C++ is a hack. It's ugly and it makes you do way to much stuff. C++ was written so you don't have to do that stuff so you might as well use it. Okay, now that everyone knows my biases :-) I'll go back to what I was doing. Tanner Lovelace -- Tanner Lovelace | [EMAIL PROTECTED] | http://wtl.wayfarer.org/ --*--*--*--*--*--*--*--*--*--*--*--*--*--*--*--*--*--*--*--*--*--*-- GPG Fingerprint = A66C 8660 924F 5F8C 71DA BDD0 CE09 4F8E DE76 39D4 --*--*--*--*--*--*--*--*--*--*--*--*--*--*--*--*--*--*--*--*--*--*-- Those who are willing to sacrifice essential liberties for a little order, will lose both and deserve neither. -- Benjamin Franklin History teaches that grave threats to liberty often come in times of urgency, when constitutional rights seem too extravagant to endure. -- Justice Thurgood Marshall, 1989
msg00171/pgp00000.pgp
Description: PGP signature
