groos
6 hours ago
C++ is probably the largest, most complex programming language to ever exist. I, as a former C++ compiler developer, find it hard to keep up with the language changes. What chance does an average user have?
pjmlp
4 hours ago
To use the subset that makes it a better alternative than C, aka "Typescript for C", and ignore the rest.
Hopefully we would have moved on into fully bootstraped alternatives, but open source has decided to build their alternative languages on top of LLVM and GCC instead, with some minor exceptions.
Note that I am starting to have a "find it hard to keep up with the language changes" similar feeling with Java, C#, Python and TypeScript.
UncleMeat
2 hours ago
This is already a good norm. A substantial portion of the new language features really aren't meant for business logic but instead help library developers anyway.
vbezhenar
5 hours ago
I have the same opinion. C++ was my first programming language I used at work. I feel that I was relatively proficient with it, but it was around 2005 I think. Since then I've mostly used other languages. Right now I feel I can use C with ease, in fact I periodically use it. But C++? I don't even dare.
I guess it's fine if one specializes on C++ programming only. But when one needs to use different languages and C++ is used sporadically, I feel like it might be substantially harder than other languages.
pjmlp
4 hours ago
The problem with C are the parts that C++ already provides an alternative, regarding bounds checking, generic code with preprocessor tricks or now that _Generic thingie, stronger typed enumerations, heap allocations without sizeof math, automatic resource cleanups.
So use a minimal approach to C++.
72deluxe
2 hours ago
I would feel the opposite. I dare not write a program in C. The mentality of RAII and destructors for resource management is so ingrained that attempting to track resource use and lifetime in C would be nightmarish.
phew3
4 hours ago
Extreme accretion/scope-creep of syntax (and features) across all languages continues, C++ is probably one of the most extreme example of this.
Everyone's trying to bring in the shiniest new toys from all other languages. So-called "modern C++" is an unbearable menu of every possible flavor of procedural, functional, OOP, templates, strong/weak typing, metaprogramming, and so much more. End result is a Frankenstein mix of C, Fortran, Pascal, Python, F#, Scala, C#/Java, Visual Basic, LUA, TCL, Rust, and what not... and that's before we even talked about the STL/STD situation in C++.
The only correct way to work with C++ is to agree on the most minimal subset of features needed for consistency and productivity in your codebase, stick to those and avoid adopting 95% of the crap that's being brought in. Ignore the noise.
bestouff
an hour ago
Sure, but even then each org agrees on a different C++ subset. So each time you switch project you have to learn again.
And then there's the constant fear of UB, which the compiler doesn't tell you about. This language became too painful for me at least a decade ago.
quietbritishjim
4 hours ago
Sorry for the nitpick, but ossification means the opposite of how you're using it here. It means existing structures / practices becoming frozen in place, by analogy with real ossification which is where flexible cartilage hardens into rigid bone.
phew3
4 hours ago
Thanks!
glimshe
3 hours ago
I've never used LLMs for C++ but I notice that it likes to use every available feature on other languages. Is Claude-generated C++ incomprehensible as a result?
dachris
5 hours ago
C++ was complex already 15 years ago (template metaprogramming, anyone?).
Can't imagine what it must be nowadays.
RavSS
4 hours ago
It's a very complex language, but I also find little reason in using any of its more niche features; however, I essentially just write C with RAII and templates when it comes to C++, so I'm probably abnormal.
For instance, I can now avoid SFINAE in C++20 and beyond, which was always the ugliest part of C++ templates to me. C++20 concepts simplified most of my metaprogramming needs.
spacechild1
4 minutes ago
In my experience, many SFINAE use cases have already been replaced by C++17's constexpr-if. Concepts are just the nail in the coffin :)
rafaelmn
4 hours ago
Reading boost libraries was like reading brainfuck. In fact most of std lib source felt that way too. I never reflected on this since I stopped doing C++ 15 years ago - but yeah I have not worked with a language that's worse to read since. Maybe macro heavy lisp ?
ReDress
4 hours ago
[dead]
mohamedkoubaa
5 hours ago
The best orgs have style guide that restrict features
jdw64
5 hours ago
Going from C++11 to 14 and so on... it’s hard to keep up with those changes. And I’m reluctant to use C++—not because C++ is a bad language, but basically because it’s been used so widely, the places I work have a lot of legacy C++ code, and since each version is different, it’s hard to adapt. I know it’s not a feature everyone uses, and I know you have to define your domain according to your work and limit yourself to a subset, but C++ can do too many things, and even within that there are many overlapping ways, so it’s more confusing. When features are added, you do feel pressure to know them, right? In my head I know “C++ should be limited depending on the domain!” but the problem is that using this language means you have to know it—and even in the same domain, C++ has many different ways of doing the same thing, so it’s freeing but painful for maintenance, I think.
hasley
5 hours ago
This may not invalidate your point, but C++11 was a major step forward that, for me, made C++ feel much more convenient and modern than before. And C++14 is basically just adding/fixing stuff that should have been in C++11 in the first place.
jdw64
5 hours ago
I like C++11 too. (My introductory book was on C++11 as well—yes, it’s that book about modern C++11.) But some projects require C++14, and other times I have to use C++98.
I’m a “traveling programmer” in Korea. But when I go out to a work site because they say I have to work on C++, as you know, there are so many versions that it’s painful.
zombot
5 hours ago
Even the author of a well-known series of books about C++ has long since "given up" because the laundry list of footguns, caveats and adversarial interactions between different features has gotten too long.
Chaosvex
5 hours ago
Assuming you're talking about Scott Meyers, that's a fabrication.
iperov
4 hours ago
The complexity of C++ lies only in template programming, and it doesn't add any efficiency to the final program—on the contrary, it makes the program harder for other programmers to read.
Technically, you're only learning to mentally unfold multi-level nested templates just to verify how they work, and all for the sake of making the program look small with less boilerplate?
This is complete nonsense. For me, C++ died with the 11 standard.