Understanding C++ An Accelerated Introduction

Understanding C++ An Accelerated IntroductionFor many people the transition from C to C++ is not easy. In fact, this transition is often accompanied by quite a bit of anxiety because C++ is surrounded by a certain aura that makes it inaccessible. For example, you can pick up a book on C++, randomly turn to a page, and encounter paragraphs like this: “From a design perspective, private derivation is equivalent to containment except for the (occasionally important) issue of overriding. An important use of this is the technique of deriving a class publicly from an abstract base class defining an interface and privately from a concrete class providing an implementation. Because the inheritance implied in private derivation is an implementation detail that is not reflected in the type of the derived class, it is sometimes called ‘implementation inheritance’ and contrasted to public declaration, where the interface of the base class is inherited and the implicit conversion to the base type is allowed. The latter is sometimes referred to as sub- typing or ‘interface inheritance’.” [From “The C++ Programming Language, second edition”, by Bjarne Stroustrup, page 413]

People who are new to C++, or who are trying to learn about it from books, often have two major questions: 1) “Everything I read always has this crazy vocabulary–’encapsulation’, ‘inheritance’, ‘virtual functions’, ‘classes’, ‘overloading’, ‘friends’– Where is all of this stuff coming from?” and 2) “This language–and object oriented programming in general–obviously involve a major mental shift, so how do I learn to think in a C++ way?” Both of these questions can be answered, and the design of C++ as a whole is much easier to swallow, if you know what the designers of C++ were trying to accomplish when they created the language. If you understand why the designers made the choices they did, and why they designed certain features into the language, then it is much easier to understand the language itself.
Language design is an evolutionary process. A new language is often created by looking at the lessons learned from past languages, or by trying to add newly conceived features to a language. Languages also evolve to solve specific problems. For example, Ada was designed primarily to solve a vexing problem faced by the Pentagon. Programmers writing code for different military systems were using hundreds of different languages, and it was impossible to later maintain or upgrade the systems because of this. Ada tries to solve some of these problems by combining the good features of many different languages into a single language.

Website: www.cs.missouri.edu | Filesize: 505kb
No of Page(s): 63
Click here to download Understanding C++ An Accelerated Introduction.

Related Tutorial

Tags: , , , , , , , , ,

Comments

Leave a Reply