Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

C++11+ is even more complex than before, so I disagree: C++ is worse now. Almost all the old crap still exists on top of the shiny new stuff.

Designing classes that distinguish & and && properly makes writing new types more difficult. You need even more boilerplate stuff now. Like: I define a '-' operator, but I don't automatically get a '-=' operator, WTF. And now I need to add a && version of the -= and += and = and to invoke move() correctly so the type system is pleased AND it won't crash. This is supposed to be used for application code, so why do we need so much brain capacity to handle it?

And I would really be interested in a survey to find our how many professional C++ programmers know the intricate rules behind overloading with template functions, template classes, inside and outside class scope, with namespaces, with & and &&, with const, with auto and lambda and maybe more etc. This is just too much!

Using classes is a bit better now (if they are written properly), but once you start defining your own types, its no fun anymore.

The nicest I can say about C++ is that it is fun if you want to experiment. But for a production system, it is not a good choice, because it is too complex.




If you aren't writing libraries you rarely need to be concerned with move semantics. At one of my two C++ jobs, literally no class has any && shenanigans and at the other.. we are making libraries, so yeah we care about that, but even then 90% "=default" is all we need.

As for the old and new stuff both being there, yes it us but that doesn't mean you need or should use all of it. The new should replace the old or at least let you clean it up.

It sounds like the code you were forced into was super sloppy. Making move increment and decrement operator is an micro-optimization in the extreme. You can probably safely remove that non-sense and not see any difference if your class implements something like sane value semantics and use RAII. But of course like any language someone can make a big ball of mud when misusing the tools.

I agree there is complexity but I think most of the complexity you have needed to deal with is because of bad code. I could write you some Python or Ruby that is equally impossible to parse and deal with. Watch as I overload methods on Method class and Class class.




Consider applying for YC's Fall 2025 batch! Applications are open till Aug 4

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: