4 ms·
Of course, if you are a C++ programmer, you should migrate to C++11 as soon as possible. But do not forget that the improvements given by C++11 do not void all
by webreac 14y ago
Of course, if you are a C++ programmer, you should migrate to C++11 as soon as possible.
But do not forget that the improvements given by C++11 do not void all the reasons to not use C++ at all. Avoid C++ if you can.
- okamiueru 14y agoAs has been said a million times, C++ covers applications that are not really suited for any other language. This applies to C as well. As much as newer languages come about, in the end, you are working with a Von Neumann machine, of which both C and C++ are well suited for. The only problem with C++ as far as I can tell is that you need to know a lot, not to make mistakes. There are too many ways to do things, that if you don't know what you are doing, you are probably going to do things wrong. However, once you _do_ know, and use libraries like Boost, I think it is difficult to come up with a reason why not to use C++ for lower level programming, with performance requirements.
- webreac 14y agoThe problem is that the prerequisite does not apply only to you, but also to all your team. It is ok to use C++ for lower level programming with performance requirements if all the development team knows very very well C++. Even if you fill these conditions during initial development of a project, during the maintenance years, you always happen to have a not so well educated developer. C++ use is a very narrow market.
- okamiueru 14y agoCode practices and code reviews help with getting beginners up to speed and not clutter the code base. If you remove all experienced developers with inexperienced ones? Surely this will cause problems in any language. Also, I'll have to disagree with C++ being a narrow market. Just the market where C/C++ is almost required (high performance or low level) is large enough as it is. Then there is the discussion of which language is _more_ suited for a given task when you are doing higher level stuff that doesn't have high performance requirements. It might be wasted resources to put people with high knowledge of C/C++ to that kind of tasks. As for the language itself, in terms of productivity; _if_ the developers are experienced, I don't see any problem with it. With help from Boost and/or Qt, it is as easy as writing python (almost, sometimes :) ).
- fauigerzigerk 14y agoThere are many reasons why I use C++ only if I must, even though I know it very well. - Maintaining two slightly different versions of most declarations is unproductive. - Not having a stack trace when the program crashes slows down debugging tremendously. - C++ compilers are horribly slow - Shared pointers are very slow memory hogs but not using them makes memory management a lot more error prone. - C++ isn't faster than Java any longer, sometimes even a lot slower, unless memory is the bottlenck (which is often the case though) I use C++ only if I absolutely must determine the exact memory layout of data structures.