3 ms·
I think the problem is in fact that nowadays developers jump into languagens like Python, Ruby or PHP People have disliked C++ long before those languages exis
by statictype 16y ago
I think the problem is in fact that nowadays developers jump into languagens like Python, Ruby or PHP
People have disliked C++ long before those languages existed or became popular. A lot of people who have written and maintain large C++ code bases will tell you straight up that they prefer C to C++.
- copper 16y agoA lot of people who have written and maintain large C++ code bases will tell you straight up that they prefer C to C++. Perhaps that's the problem right there. As someone who has written a lot of C++ for quite some time, the most nightmarish aspect tends to be working with antique codebases. The way people program in it has changed drastically over the last ten or so years. It's possible to have a reasonably painless experience with modern C++ that is pretty much impossible with codebases with significant history. A lot of that is because the compiler support simply wasn't mature enough, so people did what they had to do to ship. If all you're dealing with is old C++ code, it's extremely easy to find that you prefer coding in C rather than C++ (which is almost what that old code really is).
- agentultra 16y agoThe true test of a language, IMO, is how it will rot over a decade or so. I'm maintaining a C++ web application written 12 years ago. It's not pretty. I cannot describe the difficulties even an experience C++ developer would have in trying to understand and maintain it. Fortunately modern C++ is pretty good. We've managed to tack on a legacy compatibility layer via the Boost libs to give us a Python wrapper. It's still running in production and is still pretty useable. However, C/C++ still requires a fairly high cognitive load for a diminishing return, IMO. There are other languages that are easier to understand and maintain whose implementations are getting increasingly better at competing in areas where C/C++ used to be the go-to choice. There are simply fewer cases where I will reach for C++ these days where it used to be the only choice.
- copper 16y agoYou're absolutely right, of course - a webapp in C++ is not something that I'd want to even volunteer to help maintain. I'd just say that it's not the language that rots, but the libraries, and preexisting code. There are still some areas where C++ is a good choice, but for things like a webapp, there would have to be a really compelling reason to choose it.
- kenjackson 16y agoAnd as someone noted earlier, a lot of people formed their opinion of C++ a decade ago. A decade ago C++ compilers generally sucked. Templates were usually broken, exceptions were usually broken, and the STL was generally broken. EDG was the first front-end to really get solid. Then Visual C++ got its act together and started releasing highly standard comformant C++, and then GCC did. Now if you're writing standard compliant C++ it will likely work on the big 3 front-ends. With that said there are some complexities in C++, but fortunately you can largely be oblivious to it until you need to use them. Crockford correctly points out that Javascript has a very solid core. C++ shares that. With that said, I still prefer not to program in it... Just not a fan of non-GCed languages for the most part.