4 ms·
Does anyone choose C++ anymore unless it is required by environment/legacy/performance constraints? Back in the day I read Bjarne's book cover to cover, used C
by WhitneyLand 12y ago
Does anyone choose C++ anymore unless it is required by environment/legacy/performance constraints?
Back in the day I read Bjarne's book cover to cover, used C++ for very large scale projects, and was one of those guys who could make sense of arbitrarily complex pointer expressions.
Now I mostly regret it. Led down the rabbit hold of multiple inheritance, STL being much more complicated than templating in other languages, and watching devs take years to master all of the subtleties.
He alludes (next article) to garbage collection not being more reliable than manually memory management? Yes GC has it's own disadvantages and there are many ways in C++ to mitigate memory management problems, but seriously I wish I had a dollar for every hour of time spent on a memory allocation bug in C++.
- bstamour 12y agoI still use C++ because it not only allows me to write high performance code, but also allows me to easily express high level ideas without worrying about too much overhead. I can write generic algorithms in terms of monoids and semigroups and I can write device drivers. I do a lot of signal processing at work, so sometimes these high-level and low-level concepts exist side-by-side in the same codebase. Edit: I should mention that by no means to I think C++ is perfect. Very few other languages, however, give you the amount of low-level control, and the tools to build cheap, powerful abstractions, like C++ does.
- Scea91 12y agoWith the recent updates to the standard C++ is actually a really pleasant language to use. You just have to know a lot, but the reward is there.
- jbergens 12y agoYes, but it seems the whole team (or all teams in large enterprise projects) must know a lot. Otherwise you still and up with a lot of hard to read, unsafe code. If you start with a very large codebase of old C/C++ you might have to rewrite large parts of it to reap the benefits and in that case you might want to look into other languages as alternatives. I agree that for a green field project with very good developers C++ 14 looks nice.
- Scea91 12y agoI agree 100%.
- jj00 12y agoCouldn't you say this for any language? As soon as you start applying it to larger projects things start to get more complicated. It's not the same problem per language, but each has their own issues.
- pjmlp 12y ago> Does anyone choose C++ anymore unless it is required by environment/legacy/performance constraints? At work no. Typical enterprise world using JVM and .NET languages. For side projects, surely yes! It is the only language supported across all mobile OS SDKs with full access to the hardware. If you have control over the codebase, the ability to use C++11/14 is quite comfortable, even in terms of memory management. Now for the typical enterprise projects, with offshore developers at work I wouldn't use it. I already cry when I look at code written in less powerful languages.