K
Kevin Hall
C++ is one of my favorite languages to work in. This is because it has
so many differrent strengths. But there is also a number of blemishes
in the language -- some could potentially be fixed, others are not
likely. I wanted to open a discussion on what people think are the
good and bad things about C++. Here are my lists:
Good things about C++
---------------------
- multi-paradigm language.
- const-specifications
- deterministic destruction
- semi-strong typed (since there are some implicit conversions allowed)
- preprocessor -- it's powerful not evil. Powerful things just often
can be used for evil purposes -- and unfortunately, the preprocessor
sometimes is used in evil ways.
- Real multiple inheritance. Again, it's powerful, not evil.
- templates -- more powerful than generics provided by other languages.
- partial template specialization.
- template meta-programming.
- SFINAE, RAII, CRTP
- Is portable to more platforms than most other languages. (This is
due in part to having fewer standard libraries.)
Bad things about C++
--------------------
- Some 'baggage': throw specifications, std::vector<bool>, 'export',
some C-baggage
- No true-typedefs; typedefs are really type aliases.
- A lot of things to learn
- Due to the way C++ has evolved, some things are more complicated than
they need to be.
- Too much undefined behavior.
- No support for properties.
- No standard for name mangling.
- No reflection capabilities.
- No garbage collection. Though, GC is often used incorrectly like the
preprocessor and multiple-inheritance. Also note that there are GC
libraries for C++ -- but there are potentially some advantages to be
gained if GC were added to the language.
- Missing libraries: (though, there are many widely available
cross-platform libraries that do fill in the gaps)
* No standardized threading model/library
* No standard GUI library. However, we should note that standard
GUI's are typically not used for state-of-the-art, fancy looking apps.
The Java standard doesn't support the newest GUI features of OSX,
Windows Vista, OpenGL, or DirectX.
* The standard libraries don't cover some very common things, like
decimal and large-integer types, the ability to handle directory
structures, etc....
* No standard way to obtain stack-traces.
so many differrent strengths. But there is also a number of blemishes
in the language -- some could potentially be fixed, others are not
likely. I wanted to open a discussion on what people think are the
good and bad things about C++. Here are my lists:
Good things about C++
---------------------
- multi-paradigm language.
- const-specifications
- deterministic destruction
- semi-strong typed (since there are some implicit conversions allowed)
- preprocessor -- it's powerful not evil. Powerful things just often
can be used for evil purposes -- and unfortunately, the preprocessor
sometimes is used in evil ways.
- Real multiple inheritance. Again, it's powerful, not evil.
- templates -- more powerful than generics provided by other languages.
- partial template specialization.
- template meta-programming.
- SFINAE, RAII, CRTP
- Is portable to more platforms than most other languages. (This is
due in part to having fewer standard libraries.)
Bad things about C++
--------------------
- Some 'baggage': throw specifications, std::vector<bool>, 'export',
some C-baggage
- No true-typedefs; typedefs are really type aliases.
- A lot of things to learn
- Due to the way C++ has evolved, some things are more complicated than
they need to be.
- Too much undefined behavior.
- No support for properties.
- No standard for name mangling.
- No reflection capabilities.
- No garbage collection. Though, GC is often used incorrectly like the
preprocessor and multiple-inheritance. Also note that there are GC
libraries for C++ -- but there are potentially some advantages to be
gained if GC were added to the language.
- Missing libraries: (though, there are many widely available
cross-platform libraries that do fill in the gaps)
* No standardized threading model/library
* No standard GUI library. However, we should note that standard
GUI's are typically not used for state-of-the-art, fancy looking apps.
The Java standard doesn't support the newest GUI features of OSX,
Windows Vista, OpenGL, or DirectX.
* The standard libraries don't cover some very common things, like
decimal and large-integer types, the ability to handle directory
structures, etc....
* No standard way to obtain stack-traces.