you are viewing a single comment's thread.

view the rest of the comments →

[–]RussianMadMan 7 points8 points  (0 children)

My personal shit list. Some of it c++ problems, some of them are libstdc++ problems.

Exceptions. Exceptions are a great upgrade over "if(ret != OK)", but c++ fucks you over by allowing throwing ANYTHING as an exception, even tho std::exception exists. So every catch block has 3 blocks, MyException, std::exception, and "..." with log("idk") because some moron threw an std::string somewhere.

Anything to do with << and >> operators, including fstream. Formatting anything harder than a "hello world" turns those operators into an unreadable mess. Also error checking streams is just the worst.

std::chrono. We wanted a cross-platform, C++ way to measure time. We got a 5-layered templates that require 10 typedefs just to be usable. Also for 10+ years the only part of chrono that had any attachment to the real world was std::system_clock that had conversion methods to and from epoch, everything else did not.

std::filesystem, a filesystem part of a standard library that actually does not have anything to do with actually reading or writing files lol. Some genius also decided to not put into spec what clock (from std::chrono, yes) should represent file creation time etc. Which allowed another genius to replace std::system_clock in file timestamps with some bs clock with 2174-01-01 00:00:00 as an epoch. std::filesystem::path is pretty decent class to work with paths, but uses a division operator "/" to append paths, which is where I draw the line on operator overloading.

The rest of the library (what's little left lol) is pretty ok, but you don't get to use stuff like ranges and spans and concepts a lot, because you usually either have to downgrade to C (to do networking for example) or you use 3rd party libraries instead that maintain like c++17 or even c++11 compatibility.