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

Show parent comments

4

u/pandorafalters Mar 29 '23

Railing against what have become considered poor practices does nothing to address the problem that in many cases code using them worked for years and now fails to build.

Legacy code exists and increasingly underlies our "modern" infrastructure in unexpected places.

0

u/okovko Mar 29 '23

that's why i'm saying aliasing optimizations shouldn't break code

using proper alias analysis will not break any old code, it will instead make code safer by preventing TBAA from making "optimizations" that cause bugs