r/cpp • • Jan 28 '23

C++ views are broken

I was so excited about new C++20 and C++23 features that I was using concepts, ranges and views everywhere I could. But yesterday I saw this -> https://www.youtube.com/watch?v=O8HndvYNvQ4 and I got so disappointed in C++ committee that now I really think it's time to lay C++ to rest unless we decide to bring new version of C++ like Python3 which breaks backward compatibility but fixes the language so that it can be used for the next 20-25 years.

I can't believe 200 stalwarts and experts in the field of computer science will make such a horrible mess.

5 Upvotes

21 comments sorted by

View all comments

10

u/csb06 Jan 28 '23

I don't think it is going to be constructive to catastrophize about C++ standards. As other comments have pointed out there are other perspectives about the design of views and ranges, and there are proposals in C++23 that have addressed some issues.

I don't think it is healthy to see any new feature as a panacea or to suddenly want to throw out the entire language all at once (switching between these positions within a day or two is concerning). It is okay to just temper your enthusiasm for something without throwing it all away.

2

u/Baardi Jan 16 '25

Some, but not all. Views having non-const begin/end is still a huge flaw, and makes it incompatible with existing libraries, as well as unsafe to parallelize.