Programming is done in a specially designed language, and language
design follows general principles based on what it is we are trying to
achieve.
It is difficult to imagine a general purpose language that is good
for everything, but C++ gets quite close to this and is intended for
a large range of applications. But no language is perfect, and C++ is
certainly not perfect.
- Concise. Programs can be comparitively short compared to other languages.
- Precise. C++ has very exacting rules to say what you can do and what it means.
- Fast. When programmed correctly a C++ program can use features of the computer
being used to maximise performance.
- Good for writing programs with none, or very few, runtime overheads.
Many of C++'s features are specially designed so the
programming language itself does not introduce any unnecessary overheads.
- Extensible. Additional packages such as for "string" or "complex" can be added easily.
- Developed over a long period of time from a precursor language called C.
- Programs can be short and written quickly.
- Programs have predicatable behaviour and run on a large variety of computers.
- Programs run as fast as is reasonably possible, and correctly written
code maximises the resource available.
- Programs can use additional features written elsewhere.
- C++ builds on strengths of the very successful language C, and C programs
run (with possibly slight modifications) in C++.
Because of its speed and the way it handles numbers, C++ is an ideal choice for numerical work.
On the other hand, C++'s design philosophy makes it a difficult language to use sometimes.
- Short programs have to be written correctly, paying attention to details.
- C++ has quirky names such as int and double which may be difficult to remember.
- The precise meanings of C++ programs have to be fully understood by the programmer, and some of these are not obvious and cannot be guessed.
- Programs only run fast when written correctly, and a huge number of "expert features" can confuse a beginner.
- C++ programs can be very unpredictable when written badly because there are no run-time systems built in to check they are working as intended.
- Because there are few or no systems in place to prevent it, C++ programs can mess with your operating system and crash your computer.
- There are a large number of "dangerous" features left over from C that are probably best avoided where possible.
As always, the onus is on the programmer, not the system, to test programs written in C++ fully.
In summary, C++ is a language designed to help experts build the best possible program. It is
not always easy for beginners, but the longer-term benefits are very good.