Hacker News new | ask | show | jobs
by jonesetc 2464 days ago
There was a library called the STL that is now, with modifications, a part of the std library. So in a sense you could say that the STL is a subset of the std library, or that it was an inspiration for part of it, but many people just use the terms interchangeably.

So, what that read me says is correct, it is also called the STL. If you want to be precise you should probably only call it the std library though. There are still implementations of the original STL around separate from the std library, so keeping the distinction is probably still wise.

Also to complicate things, some people use the term STL to refer to the specific parts of the std library that are from the original STL. Those pieces are containers, algorithms, functions, and iterators I think.

tl;dr it's all a mess and people say the two meaning different things all the time.

1 comments

> There are still implementations of the original STL around separate from the std library, so keeping the distinction is probably still wise.

As far as I am aware, those libraries are defunct and unused (e.g. STLPort), so I disagree that there is an important distinction to preserve. The most widely used C++ Standard Library implementations by far are GCC’s libstdc++, Clang/LLVM’s libc++, and MSVC’s STL. Being bundled with compilers means that there is no reason to want an implementation of the historical ancestor library.

Intellectually, the STL represents a significant set of innovations and a new way of designing reusable software, and it is an elegant jewel of design; the C++ standard library does not share those distinctions. If someone is having trouble with a software design problem in another programming language, it might be a useful suggestion to tell them to try doing it “the STL way,” but telling them to do it the “standard library way” would mean something quite different.

There's also the issue of credit. The STL is a work by Alexander Stepanov and Meng Lee. Conflating it with the C++ standard library of which it has become a part—or, worse, with a particular company's implementation thereof—has the distasteful flavor of plagiarism.