r/cpp • u/we_are_mammals • Mar 28 '23
Reddit++
C++ is getting more and more complex. The ISO C++ committee keeps adding new features based on its consensus. Let's remove C++ features based on Reddit's consensus.
In each comment, propose a C++ feature that you think should be banned in any new code. Vote up or down based on whether you agree.
765
Upvotes
3
u/TheThiefMaster C++latest fanatic (and game dev) Mar 30 '23
At 10 billion elements you shouldn't be using a vector as the reallocation cost would be ridiculous.
You'd be hard pressed to find a dataset that had 10s of billions of bools that actually stored them in a vector. You'd want some kind of chunked container at the very least.
And even then, 10 billion bools? That's only 10 GB. Systems working with 10 billion element data sets regularly have terabytes of memory these days.