Sean Hoffman
2 min readNov 12, 2024

--

std:filesystem is great. I'm meh on constexpr. std::optional imho is useless language bloat. There's already a way to detect if there's a value assigned, pass a pointer and check its value before you attempt to access it. The comparison to zero literally compiles to two assembly instructions. Incorporate the validation of that pointer into your DNA, check it before you use it and exit gracefully if it's invalid.

While there have been some incredibly useful features added to the language over the years (smart pointers by far being the best), the language is missing extremely useful features like reflection which would be game changers for some other types of problems.

The override keyword is another one that gets my goat. Why is it needed? Because someone wants it to look like Java? Isn’t that the point of the virtual keyword, to know that something could be overridden?

It’s like every couple of years someone thinks some other feature needs to be added to C++, when the language already has parts of every ingredient in the cabinet in there. That’s why pure C people hate C++. They don’t get the point. I once had a brilliant C guy tell me that “the problem with C++ is that everything you want is somewhere else.” And he was right to some degree.

But I agree both languages can be dangerous (C more than C++). I burned myself a lot learning pointers and @!@k back in the eighties. While you’re not going to necessarily get the same performance as a pure C or well-written C++ app in other languages, with languages like Go you’re going to get your product to market a lot faster, and I don’t have an opinion on Rust yet, but it sounds like the speed of C++ but with checking things for you automatically. Useful I guess if you didn’t cut your teeth checking things already.

One thing’s for sure, C++ having everything but the kitchen sink thrown into the language or std library is not helping development time. It takes a while to compile all that @!)@@#.

--

--

Sean Hoffman
Sean Hoffman

Written by Sean Hoffman

Software Developer (C++, C#, Go, others), Husband, Father. I eat fried potatoes annually on July 14th.

Responses (1)