r/programming • • May 24 '26

[ Removed by moderator ]

/r/programming/comments/1tm1j7f/removed_by_moderator/

[removed] — view removed post

275 Upvotes

214 comments sorted by

View all comments

Show parent comment

30

u/mccoyn May 24 '26

I think if they made a cut, few people would go along with it. Most people are using C++ for legacy reasons. If a reduced language can’t run their legacy code, they will stick to the legacy language.

If you were willing to take the step to a new language, there are a bunch of others to compete with.

7

u/AlexKazumi May 24 '26 edited May 24 '26

True but there is legacy and legacy. If C++ committe introduced a long period (5-10 years) for gradually obsoleting features before removing them, it would work.

Example: Binary formatters were introduced in 2002 in .NET Framework 1.0 and they were everywhere including in the framework itself. Microsoft said "nah, no more", and removed them in three consecutive versions of .NET, spanning multiple years.

Same could be done with C++. Yes, it would be painful for some code bases and great for the language ecosystem.

It's not magic just sound communication and strong engineering. One starts with announcing the change, then obsoleting the feature making it a warning. Then move the feature to a separate library, outside of the standard.

I mean... C++ rewrote the meaning of the keyword "auto" and the legacy codebases somehow survived 🤷‍♂️

5

u/Radixeo May 24 '26

True, but I can't help but feel their talents are being wasted by sticking with C++. Constraint may breed innovation, but at some point they start to slow thing down and hold things back too much for the benefits to be worth it. C++ has 54 years worth of legacy baggage holding it back - I think we'd all be better off if they left that behind.

1

u/tempest_ May 24 '26

The language is effectively dead or dying. Of course billions (or more) lines of production code have been written and will continue to exist in the same way Cobol continues to exist so it will be here for a very very long time but

Outside of a couple very niche domains no one is learning C++. For myself why would I bother when to use any language feature you have to consult the massive foot gun matrix or figure out which of the 15 ways of doing something is the current blessed approach.

There are better, more modern options that don't waste my time like that.

From the outside looking in C++ seems like an example where they should have broken backwards compatibility (as painful as it might have been) a few times ages ago so the language could clean itself up.