5 ms·
I find it amusing that the post is from early 2010, almost 2 years before C++11 came out and people were already saying C++ is too complex. Now, 13 years later
by indigoabstract 3y ago
I find it amusing that the post is from early 2010, almost 2 years before C++11 came out and people were already saying C++ is too complex.
Now, 13 years later, if someone knows the all the language itself, libc++, common idioms, best practices and template meta-programming intricacies, I think it's safe to say they are more of a devoted learner/teacher than a programmer, as retaining and keeping up with all that knowledge won't leave much time for actual programming.
Maybe at least 10+ years of continuous C++ use would be a better measure of actual C++ skills?
- gpderetta 3y agoWhile the language itself has certainly gotten larger and I have had my own share of rants on the working and products of the standard committee, the day-to-day reality is that C++ has gotten easier to write and read, often significantly so. Doesn't mean it is an easy language, far from it.
- indigoabstract 3y agoAgreed, writing seems the most obvious one, as several pain points have been fixed, like smart pointers, lambdas, expanded standard library and a lot of other small things. Also the tools are great and mature and the fact that Bjarne is still involved is a bonus. I think the language complexity is much more of a problem for someone trying to learn the language, than for someone already comfortable with it. Which, may affect its future adoption, who knows. Still, the people jumping ship to other younger languages and then writing about it remind me a bit about someone trying to justify switching their ageing partner with a younger one. Perhaps understandable, but after some time, the problem may turn out to be elsewhere. We'll just have to see how sexy Rust and the other current alternatives will be when they get to C++'s age, if they still use programming languages by then.
- gpderetta 3y agoI don't blame people for jumping ships. There are a lot of mature, safe and fast enough languages (no, I'm not talking about you, python) and for many projects there is very little justifications for writing them in C++. I expect Rust to grow to be about as complex as C++, except for the most part memory safe. I still think it would be a big win overall but I don't know if it will significantly displace it though.
- indigoabstract 3y agoIt's probably unavoidable, since no single person has the power to impose a direction for Rust. There's no technical reason why C++ could not be made memory safe if needed, by piling on complexity, like compiler flags and checked smart pointers or something like that, but I don't know if it's worth it.
- wheels 3y agoIndeed. Pre-C++-11, I would actually have said that I know C++ very well. The language had a pretty stable surface area for a long time. C++11 was such a major change to the language that not only was there a lot new to learn, but a lot of new best practices needed to be developed, and a lot of the common sense on those wasn't practical because of the need to interface with existing code and libraries. I feel like reasonable API design and coding style still hasn't stabilized post-C++11.
- usefulcat 3y agoThis matches my experience. In 2010 I had been using c++ for ~15 years and at that time would have said (correctly) that I knew pretty much the entire language. This was at least partially confirmed by an interview I had at that time for a c++ role, for which I immediately knew the answer to every c++ question. Since then I've continued to use the language daily but have given up hope of ever getting back to that relative level of knowledge. I just try to learn little bits here and there whenever it's relevant to something I'm working on.
- asveikau 3y agoA lot of the new best practices of c++11 were already being developed and advocated for years before C++11. There was a part of the community that was focused on RAII, smart pointers, etc. Even lambdas had their beginnings in functors. I think the difference is a lot of people were ignoring these trends in their c++ use, and were slightly blindsided when the standard appeared to endorse them.
- wheels 3y agoIf I'm doing a project in C++, it's because there's some library that does a lot of the heavy lifting for whatever project I'm on. (This is typical for me: I usually pick languages for a project based on how good the library landscape for the problem domain in that language is.) And before smart pointers were in the standard, they weren't typically used in library APIs. Even now that they are in the standard, a lot of those aforementioned libraries don't use smart pointers in their APIs, making usage in applications mixed at best.