5 ms·
Yay more stuff to think about, while not having any seeming benefits ? I really wish some committee would just figure out a C++ for the 2020s kind of, "One way
by inDigiNeous 4y ago
Yay more stuff to think about, while not having any seeming benefits ?
I really wish some committee would just figure out a C++ for the 2020s kind of, "One way fits most" solution that removes most of the legacy features from the language (like maybe just warning if you are about to use legacy features or just preventing you to use some obscure way to iterate containers for example that was superseded already in 2011 by C++11 for example.
Is there anything like this in the plans ?
- kllrnohj 4y agoCarbon or CppFront is what you're looking for. C++ itself won't ever remove legacy just like other languages never really remove legacy. Nobody wants to be the next Python3.
- _aavaa_ 4y agoIdk python3 seems to be doing pretty well
- henrydark 4y agoGuido van Rossum mentions the break between python2 and python3 a bit in the recent Lex Fridman, you might be interested in this. Many companies and many of us put in hundreds to thousands of hours moving from 2 to 3.
- _aavaa_ 4y agoAnd I agree that this was a real cost. Yet despite that, one time, cost, enough companies chose to update the code rather than migrate. And the language is now a very popular choice. I personally think that never removing legacy aspect of a language is a clear recipe for insane complexity.
- kllrnohj 4y agoIt took 14 years to go from Python 3 being released to Python 2.7 finally being officially sunset. A date that was pushed back multiple years because there was such a strong python 2 holdout. And Python 3 is the success story here. You could instead easily end up being Perl 6 instead.
- _aavaa_ 4y agoI see your point, and I don't even disagree with it really. I don't know the history of python and why they needed to make all of the changes at once, rather than gradually deprecating features and then eventually removing them. I will reiterate my point from a sibling comment: always adding layers but never removing anything is going to get incredibly complex. The complexity will only ever grow. That complexity is a cost and a risk just as much as alienating a large part of your community is. Imagine the miles and miles of detritus that will be in the C++2122 if nothing has ever been removed in the name of backwards compatibility.
- kllrnohj 4y agoThe web hasn't removed anything and it's still going strong despite dozens if not hundreds of deprecated features. Windows has barely removed things and similarly is going strong. Backwards compatibility is an extremely powerful and desirable feature. There's other ways to keep the working set of complexity in check without losing compatibility (eg linters, modernizers, or profiles)
- _aavaa_ 4y agoA) "The web" is not some unified thing so having a certain web technology come and go is categorically different than a language deprecating features. B) I wouldn't exactly hold up "the web" and Windows as shining examples of things are going great. Even just using Windows you can see the complexity escaping control, for example there's 3 separate ways in which to change volume for sound devices on windows. Each one with a different UI and found in a different place. To say nothing of attempting to develop on it. As for the web, companies like Mighty[0], whose whole shtick is "the web and the browser you need are too bloated and slow in order to run on your actual machine. The obvious solution is to add another layer and run that browser in a virtual server and pipe the screen back to you", are getting backed and people see as a "solution". This is madness. C) > There's other ways to keep the working set of complexity in check without losing compatibility (eg linters, modernizers, or profiles) That's a "solution" only in so far as you don't consider all of those things are yet another layer of complexity that we're adding on. [0]: https://www.mightyapp.com https://www.mightyapp.com
- bluGill 4y agoP2687, P2657 are two attempts in the early stages. The basic idea is you mark a file as not allowed to use some old feature, and then the code throws an error if you use one. C++11-20 were mostly about finding and adding all the little details that you actually need to write code without the bad old stuff. C++ believes that the key to their success is backward compatibility. Even though you shouldn't use a lot of old stuff in new code, there is a lot of old C++ code out there that it isn't worth rewriting in a different language, so they cannot drop support for the old superseded stuff even though you shouldn't use it. Clazy and cppcheck will warn about using some old constructs when there is a new/modern way that is better. However most changes of the type you want require a large redesign to implement, and if the code hasn't been touched in years that isn't going to happen.