Learn the STL

Learn the STL

Post by Moritz Laas » Fri, 16 Nov 2001 04:33:46



Hi,
I have now come to a point where i have to learn how to use the STL. So I'm
searching for good tutorials or Stuff like that.

thanks

Moritz Laass

 
 
 

Learn the STL

Post by Neil Butterwort » Fri, 16 Nov 2001 05:06:35



Quote:> Hi,
> I have now come to a point where i have to learn how to use the STL. So
I'm
> searching for good tutorials or Stuff like that.

Buy the book "The Standard C++ Library, A tutorial & reference", Nicolai
Josuttis, ISBN 0-201-37926-0. You can't learn the STL (or indeed any complex
subject) from web tutorials, 99% of which are crap.

NeilB

 
 
 

Learn the STL

Post by wan cja » Fri, 16 Nov 2001 08:59:03



> Hi,
> I have now come to a point where i have to learn how to use the STL. So I'm
> searching for good tutorials or Stuff like that.

> thanks

> Moritz Laass

Hi Moritz,

I am also searching on STL stuff now, when you know any good material
please post to me. My only resource about STL at the following site:
http://www.sgi.com/tech/stl/

Cheers cjaja

 
 
 

Learn the STL

Post by qbhu » Fri, 16 Nov 2001 09:40:31



> Hi,
> I have now come to a point where i have to learn how to use the STL. So I'm
> searching for good tutorials or Stuff like that.

> thanks

> Moritz Laass

read
"Generic Programming and the STL " by Matthew H. Austern
 
 
 

Learn the STL

Post by Matt Wharto » Fri, 16 Nov 2001 14:32:21



Quote:> Hi,
> I have now come to a point where i have to learn how to use the STL. So
I'm
> searching for good tutorials or Stuff like that.

> thanks

> Moritz Laass

I recommend getting the book:

The STL Tutorial and Reference Guide: C++ Programming with the Standard
Template Library
David R. Musser  Atul Saini  Gillmer J. Derge

It has an instructive tutorial section as well as a thorough reference
section.  Just my $0.02.

-Matt

 
 
 

Learn the STL

Post by Donovan Rebbech » Fri, 16 Nov 2001 14:42:11



> Hi,
> I have now come to a point where i have to learn how to use the STL. So I'm
> searching for good tutorials or Stuff like that.

My webpage has some tutorial material

http://pegasus.rutgers.edu/~elflord/cpp/

I'd also recommend a book, try Josuttis

--
Donovan

 
 
 

Learn the STL

Post by Karel Mikla » Fri, 16 Nov 2001 20:57:58


There's one thing I wish I have been told before I started to learn the STL:
there is no imlementation of the STL. I repeat, there is no STL! While you
work on a single platform/compiler or use basic features, most flavours of
STL are great, but when you try to dig in, you're in deep shit.

After spending lots of time studying great free books like 'Thinking in C++'
(http://www.mindview.net/Books) and 'A Critique of C++'
(http://www.elj.com/cppcv3/) my view on programming changed.

After all, it depends on who you are and what you do.

Regards, Karel Miklav

Quote:> Hi,
> I have now come to a point where i have to learn how to use the STL. So
I'm
> searching for good tutorials or Stuff like that.

> thanks

> Moritz Laass

 
 
 

Learn the STL

Post by Mike Wahle » Sat, 17 Nov 2001 06:18:17



>There's one thing I wish I have been told before I started to learn the
STL:
>there is no imlementation of the STL. I repeat, there is no STL! While you
>work on a single platform/compiler or use basic features, most flavours of
>STL are great, but when you try to dig in, you're in deep shit.

While your remarks do contain some truth, note that
this situation is largely due to the relatively recent
finalization of the C++ standard.  Implementors are still
trying to catch up.  Hopefully things will get better with
time.  Also note that the C++ standard does not define a
construct called 'STL'.  Much of what was in the pre-standard
forms of 'STL' has been included (in modified and 'enhanced'
form) in what the C++ standard calls simply the 'standard library.'

Quote:>After spending lots of time studying great free books like 'Thinking in
C++'
>(http://www.mindview.net/Books) and 'A Critique of C++'
>(http://www.elj.com/cppcv3/) my view on programming changed.

Yes, one's perspective can often be influenced by
additional information.

I add my vote for the Josuttis book as being one
of, if not *the* best book on the C++ standard
library currently available.  I also think highly
of the Austern book, but it's geared more to the
abstract principles of 'generic programming' and
does not go into the depth that Josuttis does.

Another book about a specific 'component' of the
standard library, 'iostreams', that I find quite
useful and enlightening is "Standard C++ IOStreams
and Locales", by Langer & Kreft.

I believe all of these books are covered by the book
reviews at www.accu.org.

In addition to others mentioned, I find a good
online reference to be that from Dinkumware.
See www.dinkumware.com

HTH,
-Mike

 
 
 

Learn the STL

Post by Donovan Rebbech » Sat, 17 Nov 2001 07:01:03



> There's one thing I wish I have been told before I started to learn the STL:
> there is no imlementation of the STL. I repeat, there is no STL! While you
> work on a single platform/compiler or use basic features, most flavours of
> STL are great, but when you try to dig in, you're in deep shit.

Yes, because C++ has only recently been standardised, and because there
is more than one implementation of C++.

Quote:> After spending lots of time studying great free books like 'Thinking in C++'
> (http://www.mindview.net/Books) and 'A Critique of C++'
> (http://www.elj.com/cppcv3/) my view on programming changed.

"A critique of C++" basically exhausts a lot of effort in pointing out
the flaws of C++ while conveniently ignoring or at least belittling its
advantages. Its conclusion is basically that we should all stop using C++ and
use Eiffel instead.  But that's hardly a surprising conclusion -- if you're
prepared to make the kind of assumptions present in titles like
"Object-oriented Software Construction", it's a conclusion you'll reach.

--
Donovan

 
 
 

Learn the STL

Post by Ron Natali » Sat, 17 Nov 2001 07:29:36



> Yes, because C++ has only recently been standardised, and because there
> is more than one implementation of C++.

3 years is not RECENT in computer time.  The "standard" library (as opposed
to anything actually called STL) is coming along finally in most of the
popular implementations.  VC++ is careening towards correctness (although
some of the idiot service packs regress). G++'s is pretty good.  Sun's
implementation is as well.
 
 
 

Learn the STL

Post by Donovan Rebbech » Sat, 17 Nov 2001 07:44:53




>> Yes, because C++ has only recently been standardised, and because there
>> is more than one implementation of C++.

> 3 years is not RECENT in computer time.  

In context  of implementations of a complex standard maturing, it's a fairly
short time frame. Consider other "reference points": the older C standard is
over 10 years old. The Java language is about 5 years old, but the "standard"
itself is still in its infancy.

Quote:> The "standard" library (as opposed
> to anything actually called STL) is coming along finally in most of the
> popular implementations.  VC++ is careening towards correctness (although
> some of the idiot service packs regress). G++'s is pretty good.  Sun's
> implementation is as well.

Until gcc 3.0 was released, the standard library in gcc was fairly broken.
The streams class heirarchy was incorrect (eg no ios_base class, no
<sstream>),  the namespaces were completely broken. They're still stomping
bugs out of gcc 3.0.

And how many implementations support export ?

I agree that we're getting some convergence, but the smoke is only just
beginning to clear.

--
Donovan

 
 
 

Learn the STL

Post by Ron Natali » Sat, 17 Nov 2001 07:58:30


Quote:> > 3 years is not RECENT in computer time.

> In context  of implementations of a complex standard maturing, it's a fairly
> short time frame. Consider other "reference points": the older C standard is
> over 10 years old. The Java language is about 5 years old, but the "standard"
> itself is still in its infancy.

I'm not sure what point you're trying to make.  The issue is that even if they
didn't crack the standard until it was issued (which is a silly way of running
a compiler company, in my opinion), it's still been three years.  As you've
noted, Java has achieved great prominance in only slightly more time.

Quote:> Until gcc 3.0 was released, the standard library in gcc was fairly broken.
> The streams class heirarchy was incorrect (eg no ios_base class, no
> <sstream>),  the namespaces were completely broken. They're still stomping
> bugs out of gcc 3.0.

Yeah, but we're talking about today.  

Quote:> And how many implementations support export ?

What does export have to do with the library?
 
 
 

Learn the STL

Post by Donovan Rebbech » Sat, 17 Nov 2001 11:03:47



>> > 3 years is not RECENT in computer time.

>> In context  of implementations of a complex standard maturing, it's a fairly
>> short time frame. Consider other "reference points": the older C standard is
>> over 10 years old. The Java language is about 5 years old, but the "standard"
>> itself is still in its infancy.

> I'm not sure what point you're trying to make.  The issue is that even if they
> didn't crack the standard until it was issued (which is a silly way of running
> a compiler company, in my opinion), it's still been three years.  As you've
> noted, Java has achieved great prominance in only slightly more time.

Yes, perhaps I should explain, because we've digressed.

In "A Critique of C++", Joyner attacks the "lack of standardisation" in C++.

http://www.elj.com/cppcv3/s3/#s03-49

This criticism varies between out of date, disingenious, and dishonest.
Here are some of my counterpoints:

(*) Criticisms that C++ is "not standardised" are no longer true.

(*) The main point I was trying to make is that claims about the
lack of compliant implementations are rapidly becoming moot. A lot
of progress has been made, and implementations are improving.

In fact Eiffel has IMO *more* of a problem here than C++.

(*) I love the quotes that basically say that C++ is more of a moving
target than java. What is this guy smoking ?

I'm not bashing Eiffel. I'm bashing the proposition that we should
all dump C++ and use Eiffel instead.

Quote:>> Until gcc 3.0 was released, the standard library in gcc was fairly broken.
>> The streams class heirarchy was incorrect (eg no ios_base class, no
>> <sstream>),  the namespaces were completely broken. They're still stomping
>> bugs out of gcc 3.0.

> Yeah, but we're talking about today.  

Today, gcc 3.0.x still has some bugs, which pose an obstruction to its use
as a "primary system compiler". I use it for testing purposes, since its
standards compliance is better than previous releases, but I can't compile
all of the C++ system libraries with it.

--
Donovan

 
 
 

Learn the STL

Post by Andrew Koeni » Sun, 18 Nov 2001 00:07:16


Quote:>> Yes, because C++ has only recently been standardised, and because there
>> is more than one implementation of C++.

Ron> 3 years is not RECENT in computer time.  The "standard" library
Ron> (as opposed to anything actually called STL) is coming along
Ron> finally in most of the popular implementations.  VC++ is
Ron> careening towards correctness (although some of the idiot service
Ron> packs regress). G++'s is pretty good.  Sun's implementation is as
Ron> well.

I agree with you that 3 years is not recent in computer time.
Unfortunately, it is recent in programming community time.

My experience is that from the time an idea for a new language
facility becomes accepted in principle to the time it becomes
widely available to users is about four years.  This was true
in 1970, when I first observed the phenomenon, and it is still
true today.

The problem is not that it takes four years to implement new ideas,
but rather that once they have been implemented, it takes time
for them to percolate out to the users.

--

 
 
 

Learn the STL

Post by P.J. Plauge » Sun, 18 Nov 2001 02:43:41



> > Yes, because C++ has only recently been standardised, and because there
> > is more than one implementation of C++.

> 3 years is not RECENT in computer time.  The "standard" library (as opposed
> to anything actually called STL) is coming along finally in most of the
> popular implementations.  VC++ is careening towards correctness (although
> some of the idiot service packs regress). G++'s is pretty good.  Sun's
> implementation is as well.

Dinkumware has been shipping a complete implementation of the Standard C++
Library (aka STL in some circles) for several years now. Admittedly, no
compiler has yet been released that fully conforms, but several (most
notably those based on the EDG front end) have provided everything the
library needs for some time. Even GCC has been complete enough since V2.95.2.
Our GCC/Comeau library package supplies a completely conforming library for
several platforms.

P.J. Plauger
Dinkumware, Ltd.
http://www.dinkumware.com