Developer forums (C::B DEVELOPMENT STRICTLY!) > Development

Building C::B with GCC 4.1.0

<< < (6/6)

Michael:

--- Quote from: killerbot on February 14, 2006, 08:17:15 pm ---
--- Quote ---I am curious to know what all the books written by C++ Experts that I have bought, will say about it
--- End quote ---
Check out Scot Meyers and Herb Sutters their books ...

--- End quote ---

Unfortunately, I do not have those books :(.

Michael

thomas:

--- Quote ---I have always appreciated C++ multiple-inheritance (especially when programming with Java Very Happy). Anyway, it has a cost as you correctly demonstrate.
--- End quote ---
Multiple inheritance is really no bad thing, that's not what I wanted to demonstrate :lol:
My point was that multiple virtual inheritance is still more expensive than (single) virtual inheritance.

In fact, I believe that multiple inheritance is one of the best features of C++, you only have to keep a few things in your head. One such thing is the "Diamond of Dread", and another example is the extra memory cost for virtual base classes.

Let's not forget that neither Stroustrup is stupid, nor are the ISO committee members, so if multiple inheritance was really that bad, then it wouldn't have been implemented in the first place, and it would never have made it into the standard ;)

Java has no multiple inheritance mainly for three reasons:
1. A compiler (and a virtual machine) supporting multiple inheritance is harder to implement and requires more resources.
2. C++ was designed to write software that runs country-wide call-centers, international airports, and airline booking systems. Java was designed to run embedded smart appliances ( = toasters with internet access).
3. Multiple inheritance (C++ in general) is not fool-proof. You really have to know what you do, and you really have to think about what you do, or your life will be a very unhappy one. Java, however, was explicitely designed for fools. Java does not require the programmer to think about "dangerous" things (in fact, it does not even allow it). The good side (and certainly one reason why Java was so successful) is that this avoids many problems alltogether.

Michael:

--- Quote from: thomas on February 14, 2006, 08:24:30 pm ---
--- Quote ---I have always appreciated C++ multiple-inheritance (especially when programming with Java Very Happy). Anyway, it has a cost as you correctly demonstrate.
--- End quote ---
Multiple inheritance is really no bad thing, that's not what I wanted to demonstrate :lol:
My point was that multiple virtual inheritance is still more expensive than (single) virtual inheritance.

In fact, I believe that multiple inheritance is one of the best features of C++, you only have to keep a few things in your head. One such thing is the "Diamond of Dread", and another example is the extra memory cost for virtual base classes.

Let's not forget that neither Stroustrup is stupid, nor are the ISO committee members, so if multiple inheritance was really that bad, then it wouldn't have been implemented in the first place, and it would never have made it into the standard ;)

--- End quote ---

Yes, I agree. If it was such an evil thing Stroustrup and the ISO C++ committee members would have never implemented it.


--- Quote from: thomas on February 14, 2006, 08:24:30 pm ---2. C++ was designed to write software that runs country-wide call-centers, international airports, and airline booking systems. Java was designed to run embedded smart appliances ( = toasters with internet access).

--- End quote ---

Well, toasters with internet access are especially useful for housewifes, or :D? So, they can prepare a tost while writing an email, speaking with a friend or watching the latest telenovela :).

To be serious, Java seems also to be useful to develop Web Services and related applications.


--- Quote from: thomas on February 14, 2006, 08:24:30 pm ---3. Multiple inheritance (C++ in general) is not fool-proof. You really have to know what you do, and you really have to think about what you do, or your life will be a very unhappy one. Java, however, was explicitely designed for fools. Java does not require the programmer to think about "dangerous" things (in fact, it does not even allow it). The good side (and certainly one reason why Java was so successful) is that this avoids many problems alltogether.

--- End quote ---

Yes, you are right about Java. Anyway, it is not easy in Java to develop efficient software.

Personally, I prefer a language as C++. May be more difficult to learn and master, but more powerful and flexible. I also wait to see what D will become.

Michael

Michael:

--- Quote from: thomas on February 02, 2006, 04:14:14 pm ---
--- Quote ---You'ren't missing anything really. I just named the problem, why and where it happened, but the only interest shown there was how I got to compile GCC 4.1.0 Smile
--- End quote ---
And I still have not managed to compile it... :(

--- End quote ---

I am not sure, but may be this post could help you to compile GCC 4.1.

Best wishes,
Michael

Navigation

[0] Message Index

[*] Previous page

Go to full version