I was reading an article the other day entitled "Adding Perl to Your C++ Applications", a rather interesting read. However, like so many other sources, it refers to the "STL", despite the fact that very few people still use the STL (which was designed at SGI). [1]


Parts of the C++ Standard Library were based on parts of the STL, and it is these parts that many people (including several authors and the notoriously error-ridden cplusplus.com) still refer to as "the STL". However, this is inaccurate; indeed, the C++ standard never mentions "STL", and there are content differences between the two. [2]

So I am here to ask everyone to stop using the erroneous term "STL"!

Assuming that you are referring to the library that is defined by the C++ standard, the correct terminology is C++ Standard Library and a suitable abbreviation is stdlib, or libstdc++ to cheekily borrow the name of GCC's implementation.

I [arguably] wouldn't usually be so pedantic, but this is an extremely prevalent mistake and I am doing everything I can to prevent the new generation of C++ programmers from falling into this trap.

Naturally, there are those who have noticed this disturbing trend as I have, but who disagree that it's problematic. They tend to argue that language evolves and that the term "STL" has become a popularised and widely-accepted synonym for the current C++ Standard Library. [3]

Were this true then there wouldn't be much of a practical problem; it'd simply be irritatingly incorrect in the strictest sense. Alas, it's not. "STL" is rarely used to refer to the bits of the stdlib that happen to be based on the SGI STL. People think it's the entire standard library. It gets put on CVs. And it is misleading.

As one commenter on Jesper's article explains:

The issue is one of con­fu­sion. Which parts of the stdlib are in the STL? iostream? string? slist and oth­ers in the SGI STL, pro­vided by some imple­men­ta­tions, but not in the stan­dard? Addi­tions from TR1? What about 0x? Even though most peo­ple have very sim­i­lar def­i­n­i­tions, they are all slightly off from each other.

Why not just say "stdlib" if you mean the C++ Stan­dard Library?

How­ever, I some­times do want to talk about the SGI library — or rather the ideas and idioms it made pop­u­lar in C++, even if not the actual source code.

So let's just stop it!

Update 05/03/2011: See this answer to a StackOverflow post that came out of this article, for a more detailed explanation of my standpoint.

[1] "When the STL Isn't Enough: Adding Perl to Your C++ Applications", Ken Fox, 1998
[2] C++ as defined by ISO/IEC 14882-1998 & ISO/IEC 14882-2003.
[3] "STL, language lawyers and pedantry", Jes­per Alf Dam, 2010

Image used with permission
© Elizabeth O. Dulemba, Children's Book Author/Illustrator
Visit www.dulemba.com to learn more and download more coloring pages.