On Sunday 26 September 2004 14:32, Jerry Feldman wrote:
On Sun, 26 Sep 2004 13:15:54 -0400
"Steven T. Hatton"
wrote: I don't disagree that it superficially is very much like C with much in common with C++ as well. It is blatantly clear that the Java designers were looking at C++'s object model when they created their own. Even where they deviated from C++, it was often a conscious departure from the model they were following. They also took some things from Small Talk. Since I know far less about ST than C++, I cannot say much here other than that, I believe they took the concept of a universal base class (UBC) from Small Talk.
This is most likely true. C++ was essentially built upon legacy C where the designers of Java had no legacy language to support. They decided to enforce a strict OO environment. they also decided to avoid multiple inheritances as well as operator overloading.
I believe a better way of putting that last sentence would be, "They also resigned themselves to forego multiple inheritances as well as operator overloading." I believe the latter has always been a regret of Gosling. The reason the former was not doable is because if you have a UBC, you have a diamond DAG at every node in your inheritance diagraph other than the root. It's unfortunate that C++ programmers don't fully understand the merits of pure virtual interface classes. Many good aspects of Java's design come from a solid understanding a appreciation of Stroustrup's design philosophies. In many cases Java programs do a better job of realizing Stroustrup's intentions than comperable C++ programs. Much of this is not due to the language differences, per se. It's due to a lack of understanding on the part of C++ programmers...And the fact that C++ can get a bit unwieldy with all its #include directives in conjunction with the use of pure virtual functions and MI. This is an interesting animal: http://digitalmars.com/d/index.html -- Regards, Steven