3 ms·
Sure, there are nice parts of C++. And there are also brain-dead parts that add needless complexity such as: * rvalue references * the difference between auto
by hackyhacky 7mo ago
Sure, there are nice parts of C++. And there are also brain-dead parts that add needless complexity such as:
* rvalue references
* the difference between auto, decltype, typeof
* unreadable template monstrosities
* various different flavors of "smart" pointer
* the continued existence of footguns relating to UB, dangling pointers, unexpected temporary lifetimes, etc
* total absence of a build system or package management
* legacy APIs that still take raw pointers
* concepts, a half-assed attempt at generic constraints
- pjmlp 7mo agoNo worries, you get some of those in C23, and C2y. Where is C's build system and package management? Yeah, because using _Generic alongside typeof and preprocessor macros isn't half-assed attempt at generics.
- hackyhacky 7mo agoYou misunderstood. Perpetuating C's weaknesses, and then adding additional complexity, is not a defense.
- pjmlp 7mo agoIt kind of is, when the goal was to be TypeScript for C, before this was even a concept. Now ideally we would all be using Modula-2, Ada, Delphi, VB, C#,.... and co, but given that even C compilers are nowadays written in C++, we make do with what we have, while avoiding C flaws as much as possible.