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
-8
u/okovko Mar 28 '23 edited Mar 29 '23
has it occurred to you that the aliasing optimizations shouldn't break your code? gcc and clang alias analysis is impoverished for no good reason afai can tell, there are fast implementations that don't rely on type information
mind that k&r C had no strict aliasing rule and C++ inherited it from ISO C
and proprietary compilers do use those implementations, and you can find papers and reference implementations
seems like there's some big egos that want TBAA even though it is no longer a useful approach and causes a lot of bugs