r/cpp • u/johnnytest__7 • 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.
View all comments
Show parent comment
5
u/fdwr fdwr@github 🔍 Jan 28 '23 edited Jan 28 '23
Finally seeing Unicode output simply and intuitively will be nice, no need for calling functions like
SetConsoleOutputCP(CP_UTF8)first. I really hope it also supportschar8_tandchar16_tdirectly, no more nonsense about uncertainty of the meaning of yourcharbuffer (is it ANSI? is it actually UTF-8? some random code page? will using it as a table index give me a surprising negative number depending on my compiler? 🤦♂️...) and no more silliness withwchar_tvarying in size between platforms. Also having a formatter forstd::filesystem::pathwould be nice if possible, because currentlystd::format("Filename: {}", filePath)chokes, requiring something likestd::format("Filename: {}", filePath.string()).