C++ philosophy and design
C++ started as a humble preprocessor for C, so it's only natural that it inherited C's low-level character with its direct map to hardware, memory allocation control (stack and heap), pointer arithmetic, casts between types, dangerous lack of boundary checks, and also that of implicit initialization. Much of the early success of C++ has its roots in the decision to maintain backward compatibility with C in order to be able firstly to compile old C sources, and secondly to maintain the high performance of the resulting code.
Hence, one of the first and most important design guidelines for C++ was, and still is, the zero-overhead abstractions principle, or rephrased, you don't pay for what you don't use. The meaning ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access