C++ STL Usage

The cluster debates the merits of using the C++ Standard Template Library (STL), including its usefulness, portability, performance concerns, and alternatives like custom implementations, Boost, or replacements such as EASTL.

πŸ“‰ Falling 0.5x Programming Languages
3,920
Comments
20
Years Active
5
Top Authors
#2709
Topic ID

Activity Over Time

2007
13
2008
29
2009
26
2010
73
2011
108
2012
166
2013
163
2014
216
2015
176
2016
287
2017
239
2018
224
2019
267
2020
330
2021
319
2022
335
2023
341
2024
311
2025
276
2026
25

Keywords

RAM MMU e.g EA STL gcc.gnu StatusOr faq.html github.com EASTL stl library standard library std data structures standard avoiding structures libraries templates

Sample Comments

72deluxe β€’ Aug 19, 2014 β€’ View on HN

Do people really not use the STL? It's incredibly useful, and portable!

general_failure β€’ Nov 13, 2012 β€’ View on HN

Sure, why not. It's better C++ and STL.

kcb β€’ Aug 20, 2020 β€’ View on HN

Are you saying a C++ developer shouldn't use the standard library?

vbezhenar β€’ Nov 21, 2018 β€’ View on HN

I knew one guy who used C++ but hated STL and most of standard library. He usually implemented data structures in-place as he need them (linked list, growable array, etc). While it seems strange to reimplement similar data structure over and over again, it worked for him. And one particularly wonderful thing was how fast his projects compiled. He had one project with few libraries, around 100k lines and it compiled very fast, something like second from the scratch and it was 10 years ago.

farseer β€’ Apr 15, 2024 β€’ View on HN

No because of the current active community around C++. The large standard template library is safer to use than in-house implementation of the same data structures. The C++ Boost library also gives you a large arsenal of utility functions that is vetted by the community.

dgan β€’ Sep 13, 2021 β€’ View on HN

As much as i dislike C++.. Std is invaluable in comparison to home baked C libs

pagekalisedown β€’ Feb 24, 2012 β€’ View on HN

If you can't use Boost and STL, you're C++'ing in the stone age.

amelius β€’ Nov 25, 2016 β€’ View on HN

Why didn't they just use the same algorithms as typical implementations of C++'s STL?

bt848 β€’ Sep 12, 2019 β€’ View on HN

In what way can β€œSTL” be considered a performance hit? It looks like you just threw out every C++-related word you know.

blovescoffee β€’ Jan 28, 2024 β€’ View on HN

Because people tend to write c++ for performance reasons and the perf profiles of std::vector are not always sufficient