29 ms·
I agree, and every time I see someone refer to the standard library as the STL, I know I’m interacting with someone who doesn’t actually know the language very
by jb1991 2y ago
I agree, and every time I see someone refer to the standard library as the STL, I know I’m interacting with someone who doesn’t actually know the language very well.
- Longhanks 2y agoYet, Microsoft's own implementation was open sourced in 2019 in the repo "microsoft/STL" and in the second line of the readme claims the C++ standard library be also known as STL and the readme continues to use the term STL to refer to the C++ standard library. (https://github.com/microsoft/STL https://github.com/microsoft/STL, https://github.com/microsoft/STL/commit/219514876ea86491de191ceaa88632616bbc0f19 https://github.com/microsoft/STL/commit/219514876ea86491de19..., https://github.com/microsoft/STL/blame/main/README.md#L3 https://github.com/microsoft/STL/blame/main/README.md#L3)
- germandiago 2y agoSTL is actually a subset of the full C++ standard library, which includes, for example, C headers. The STL is the algorithms + data structures + utilities, which are templates.
- Longhanks 2y agoFrom a dogmatic point of view, this might've been correct at some point in time. But, as the links from above clearly point out, most people use "STL" and "C++ standard library" interchangeably (including the very maintainers of one of the most populous C++ standard library implementations), without excluding certain parts of one or the other.
- deleted 2y ago[deleted]
- zabzonk 2y ago> the readme continues to use the term STL to refer to the C++ standard library. Would not be the first time Microsoft were wrong about a standard.
- caspper69 2y agoInteresting that their implementation is Apache 2.0 licensed, yet includes exceptions for LLVM and for GPLv2 licensed code/projects wrt patents. Does anyone know if the library's quality is on par with the GNU or Clang libraries? Google has their own too, if memory serves. Is there an implementation deemed "the best"?
- Longhanks 2y agoThe license was explicitly chosen to enable code sharing with LLVM's libc++ (https://devblogs.microsoft.com/cppblog/open-sourcing-msvcs-stl/ https://devblogs.microsoft.com/cppblog/open-sourcing-msvcs-s...). The MSVC STL's quality is good enough for thousands of pieces of Windows software (including Windows itself & Microsoft's software such as Office) to depend and rely on. It delivers excellent performance for a broad range of use cases. It is actively developed in the open, delivering cutting-edge (C++23 & C++26) features, accepting Pull Requests and wonderfully documented on GitHub. It can be consumed using MSVC and LLVM clang-cl (which the MSVC STL maintainers test with CI infrastructure). The maintainers are actively working on "hardening" features to enable more secure C++ (https://github.com/microsoft/STL/wiki/STL-Hardening https://github.com/microsoft/STL/wiki/STL-Hardening). Unless you specify what "best" or "a library's quality" means to you, MSVC STL is excellent and because of that, the default choice on & for Windows. Google chooses to only support libc++ for Chrome/Chromium (https://chromium.googlesource.com/chromium/src/+/main/docs/toolchain_support.md https://chromium.googlesource.com/chromium/src/+/main/docs/t...). libc++ is not a Google-owned project.
- caspper69 2y agoThank you for the insightful post.
- electroly 2y agoFrom https://learn.microsoft.com/en-us/cpp/standard-library/cpp-standard-library-overview https://learn.microsoft.com/en-us/cpp/standard-library/cpp-s... -- "Microsoft's implementation of the C++ Standard Library is often referred to as the STL or Standard Template Library. Although C++ Standard Library is the official name of the library as defined in ISO 14882, due to the popular use of "STL" and "Standard Template Library" in search engines, we occasionally use those names to make it easier to find our documentation. From a historical perspective, "STL" originally referred to the Standard Template Library written by Alexander Stepanov. Parts of that library were standardized in the C++ Standard Library, along with the ISO C runtime library, parts of the Boost library, and other functionality. Sometimes "STL" is also used to refer to the containers and algorithms parts of the C++ Standard Library adapted from Stepanov's STL. In this documentation, Standard Template Library (STL) refers to the C++ Standard Library as a whole."
- jb1991 2y agoI certainly don’t think Microsoft can be used as a barometer for what is considered accurate or standardized with C++.
- whobre 2y agoMeh - many simply use STL for the STandard Library. Few people even remember Stepanov’s Standard Template Library.
- pjmlp 2y agoThe SGI documentation for it was quite nice though.
- werdnapk 2y agoSo I haven't been a C++ programmer for almost 20 years now (I would have considered myself very experienced with it at the time) and STL was the Standard Template Library for me back then. Is the Standard Template Library no longer in (widespread) use? Would any modern C++ programmer use it anymore?
- injidup 2y agoA modern c++ programmer uses Rust so no.
- stonemetal12 2y agoThe STL was standardized and made part of the standard library in 1998. So no it hasn't been a thing in more than 20 years. It was around 2003 when I noticed people start to take issue with calling the standard library templates the STL. IDK why. Used yes, referred to as the STL not unless you like hostility from the language lawyers on stack overflow.
- pjmlp 2y agoI use C++ since 1993 and still refer to the standard library as STL, as do many WG21 members in many of their conference talks, do they don't know C++ very well? It is a matter of habit and none of us are going to change, only because some folks think otherwise on the Internet.
- badsectoracula 2y agoPretty much every C++ developer i've ever interacted with the last 25 years -informally- refers to the standard library as 'STL'. I do not think anyone with even a small amount of C++ experience will be confused when 'STL' is referenced in the context of C++. Of course it might be that every C++ developer i've interacted with doesn't really know the language very well. But considering the popular axiom that says something along the lines of 'people who claim they know C++ do not really know C++ while people who know C++ do not claim they know C++' what you wrote might actually be true :-P.
- ryandrake 2y agoWell, a lot of people in general use words incorrectly when speaking informally, that doesn't make that usage correct. Irregardless, for all intensive purposes, I could care less how people say STL.
- billforsternz 2y agoI see what you did there, well played sir.
- messe 2y ago> that doesn't make that usage correct Eventually it does. That's how language evolves. Prescriptivism is pointless pedantry.
- EnergyAmy 2y agoI think you missed that the OP was demonstrating that statement false in the latter portion of their comment.
- ryandrake 2y agoYes, language evolves over long periods of time, but not all incorrect spelling and usage is language evolving in front of our eyes. Sometimes, it's just poor English knowledge.
- wholinator2 2y ago
- dataflow 2y ago> I agree, and every time I see someone refer to the standard library as the STL, I know I’m interacting with someone who doesn’t actually know the language very well. I would put away the judgment. I and many others still call it the STL despite knowing the language and history of the term. Because that ship sailed and it's what many people call it nowadays. Because writing out "the standard library" every damn time gets really tiring really fast. It works in the reverse direction too, btw. The people who constantly nitpick on this are usually the ones who are more focused on being pedantic than being helpful. So that's the signal you send when you do that. Ask me how I know.