Sep
23
2009
--

C++ Sucks

After having used the Java programming language for two solid years at CERN, and now having to re-work on some old C++ code, I can say with authority that C++ sucks.

Let me count the ways!

  1. Header files. Why do we need header files??
  2. Object files. The only way to know if everything is compiled right is to recompile everything. This is related to #1, I’m pretty sure.
  3. Memory management–what a PITA!! I know, I know–doing your own memory management is much more powerful. I DON’T CARE! Garbage collection is (IMHO) much more conducive to GETTING THE PROGRAM COMPLETED!
  4. No inner classes
  5. What’s up with all the double colons? NOT READABLE!
  6. Every method has to begin with “ClassName::”. Can you say “Redundant”?
  7. The default visibility for any subroutine is GLOBAL. Global variables are EVIL!
  8. You can’t test a class by simply adding a “main” method (see 7: You don’t have a concept of “ClassName::main”)

Of course, you can do everything in C++. I hate that argument: you can do everything with ANY programming language (Fortran, Basic, Ada, assembly language, even the Turing Machine).

Written by Elliott in: Uncategorized |

Powered by WordPress | Aeros Theme | TheBuckmaker.com