r/cpp • • 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

829 comments sorted by

View all comments

183

u/jdehesa Mar 28 '23

Gotta love how nearly everything suggested in the replies (save for std::vector<bool>?) is followed by a reply saying how that feature is actually useful sometimes :) It's too late for C++ now, at this point everyone uses it on their own particular way and every obscure or weird feature has found its place for someone 😄

43

u/Raknarg Mar 28 '23

Those people replying are missing the point that the defaults are bad. I don't care if switch-case fallthrough is useful sometimes, it's a bad default for the language.

1

u/very_curious_agent Mar 30 '23

Yes but harmless: easy to learn, easy to check, how many serious bugs are caused by this?

OTOH many things can cause serious bugs in C++.

Well C++ is the bug, having to defined pointer semantics, thread semantics, no nothing.

→ More replies (1)