Why would anybody use C over C++? -


Although people like about C ++, I have not found enough evidence why you want C + + Choose C as C does not seem to get too much flak and if C ++ is all these problems why can not you limit yourself to only the subset? What are your thoughts / experiences?

Joel's answer is good for your reasons , Though some others are:

  • You have to meet the industry guidelines, which is easy to prove and test in C.
  • You have to work with Tool C but not only think about C ++ (compiler, but all support tools, coverage, analysis, etc.)
  • Your Targeted developers are C
  • You know that the C ++ compiler is not good at optimizing the code you need to write
  • not your app Only you write, T lends itself to being object-oriented, but it is hard to write in that form
< P> In some cases, however, instead of using you C, instead of using C ++:

  • You want to display Enmbler without the hassle of coding in the assembler (C ++, in theory, is capable of 'full' display, but compil optimization is not good to see, good programmer will see)
  • The software you are writing is trivial, or almost So - press the small compiler, write some lines of code, compile it and You are all set - there is no need to open a huge editor with helpers, there is no need to deal with practically empty and useless sections, namespaces, etc. You can do almost the same thing with the C ++ compiler and only the subset, but the C ++ compiler is slow, even for small programs.
  • You need extreme display or small code size, and the C ++ compiler is really hard to complete due to its size and performance libraries

However, if you are doing this, then you are using C. Does your question really use "C programmer C ++ compiler?" If it is, then you do not consider either language differences, or you can not understand compiler theory.

- Adam


Comments