Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    text
    copied!<p>The "STL" <a href="http://en.wikipedia.org/wiki/Standard_Template_Library#History" rel="noreferrer">was written by Alexander Stepanov</a> in the days long before C++ was standardised. C++ existed through the 80s, but what we now call "<a href="http://en.wikipedia.org/wiki/C%2B%2B" rel="noreferrer">C++</a>" is the language standardised in ISO/IEC 14882:2014 (and earlier versions, such as ISO/IEC 14882:2011).</p> <p>The STL was already widely used as a library for C++, giving programmers access to containers, iterators and algorithms. When the standardisation happened, the language committee designed <em>parts of</em> the C++ Standard Library (which is part of the language standard) to <em>very</em> closely match the STL.</p> <p>Over the years, many people &mdash; including prominent book authors, and various websites &mdash; have continued to refer to the C++ Standard Library as "the STL", despite the fact that the two entities are separate and that there are some differences. These differences are even more pronounced in the upcoming new C++ standard, which includes various features and significantly alters some classes.</p> <p>The original STL is now often called "an implementation of the C++ Standard Template Library" (rather backwards to actual history!), in the same way that your Microsoft Visual Studio or GCC ships an implementation of the C++ Standard Library. But the "Standard Template Library" and the "Standard Library" are not the same thing.</p> <p>The battle is about whether the current Standard Library should be called "the STL" in whole or in part, and/or whether it matters what it's called.</p> <p><strong>For "STL"</strong></p> <p>There is a school of thought that says that everybody knows now that "STL" means the standard library, just as everybody now knows that "C++" is the ISO-standardised language.</p> <p>It also includes those who believe that <em>it doesn't really matter</em> as long as all parties understand what is being talked about.</p> <p>It's a term made even more prevalent by the nature of the beast, much of which makes heavy use of the C++ feature known as "templates".</p> <p><strong>For "C++ Standard Library" (or stdlib)</strong></p> <p>However, there is another school of thought &mdash; to which I subscribe &mdash; that says that this is confusing. People learning C++ for the first time <em>do not</em> know this distinction, and may not notice small language differences.</p> <p>The author of that article has numerous times encountered people who believe that the entire C++ Standard Library <em>is</em> the STL, including features that were never part of the STL itself. Most vocal proponents of "the STL", in contrast, know exactly what they mean by it and refuse to believe that not everybody "gets it". Clearly, the term's usage is not uniform.</p> <p>In addition, there are some STL-like libraries that are in fact implementations of the original STL, not the C++ Standard Library. Until recently, <a href="http://stlport.sourceforge.net/" rel="noreferrer">STLPort</a> was one of them (and even there, <a href="http://www.stlport.com/doc/sgi_stl.html" rel="noreferrer">the confusion</a> abounds!).</p> <p>Further, the C++ Standard does not contain the text "STL" anywhere, and some people habitually employ phrases like "the STL is <em>included</em> in the C++ Standard Library", which is plain incorrect. </p> <p>It's my belief that continuing to propagate the usage of the term in this way will just lead to the misunderstanding going on forever. Alas, it may be entirely counter-productive to attempt to change things, even if it's supposed to be for the better. We may just be stuck with double-meanings forever.</p> <p><strong>Conclusion</strong></p> <p>I appreciate that this post has been a little biased: I wrote the article you linked to. :) Anyway, I hope this helps to explain the battle a bit better.</p> <p><strong>Update 13/04/2011</strong></p> <p>Here are <a href="https://stackoverflow.com/revisions/5647543/1">three</a> <a href="https://stackoverflow.com/questions/541022/please-help-with-stl-stringstream">perfect</a> <a href="https://stackoverflow.com/revisions/1494182/3">examples</a> of someone who is using "the STL" to refer to the entire C++ Standard Library. It continues to baffle me that so many people swear blind that nobody ever does this, when it's plain to see almost on a daily basis.</p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload