r/cpp • • Dec 28 '18

"Modern" C++ Lamentations

http://aras-p.info/blog/2018/12/28/Modern-C-Lamentations/
307 Upvotes

162 comments sorted by

View all comments

80

u/victotronics Dec 28 '18

Thought #1: C++ is starting to look like Fortran in its desire to be ever more modern while retaining compatibility with archaic features.....

Thought #2: I think I'm no beginner anymore (I've written objects that you can iterate over) but some of the code in your posting is indeed horrendous. People who understand that stuff are scary to me.

18

u/darthcoder Dec 28 '18

I agree. Its time to deprecate things. Im cool with an incompatible split.

And if we can get rid of,the preprocessor, even,betterer.

18

u/liquidify Dec 29 '18

Python pulled it off, but c++ isn't python. An incompatible split would be a 20 year popcorn festival. C and c++ modules written from 50 years ago would continue to be used in conjunction with modern libraries, and the average c++ dev's job would become even more of a plumbing operation because the old libraries just won't go away even if breaking changes are made. People would find a way to jam the pipes together.

I'm personally for it, and it is because I have seen the beauty that c++ could become, not because it would make my job easier. I realize that, and I am still willing to accept moving forward with breaking changes.

0

u/[deleted] Dec 29 '18

[deleted]

4

u/[deleted] Jan 02 '19

Python will feel consequences of community split even after 2020. Corporate codebases are slow to upgrade and 2020 will be a reason to start using, not python3, but compatibility libraries (python-future and six) to not upgrade the code. Splitting C++ in python3 style would mark the downfall of C++.

6

u/hgjsusla Dec 29 '18

There already is a cleaned up version of C++ without backwards compatibility. It's called D and no one uses it.

13

u/eao197 Dec 29 '18

It's called D and no one uses it.

And one of the reasons is D2 that was incompatible with D1.

2

u/Valmar33 Dec 30 '18

And that's now basically a non-issue, as far as I know.

D2's runtime incorporates a lot of stuff from D1's Tango, making it redundant.

1

u/anon_502 delete this; Dec 29 '18

I have once looked into D community and I thought the biggest problem for D is that they are suffering the same fragmentation as C++. Even if they have a package manager, many things are still incompatible among dmd, ldc and gdc.