On Sunday 26 September 2004 07:56, Jerry Feldman wrote:
On Sun, 26 Sep 2004 01:11:56 -0400
"Steven T. Hatton"
wrote: Garbage collection, byte compiling, running on a VM, no explicit pointers, and I'm confident other features have their origins in Emacs Lisp. If you look closely you may even discover that an object is pretty much just a specialized list.
First, running in a VM is shared by nearly every interpretive language. Lisp, of course, is one of the oldest computer languages with its origin going back to the 1930s. One also must remember that Gosling was the author of the Gosling, or Carnegie-Mellon Emacs. Compiling to an intermediate language has been around for a while also. We can also look at Algol and see some Algol in Java. But, the basic language is essentially C with some fixes.
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.
Similar to C++, Java has constructors and overloading, but also lacks destructors, which are somewhat unnecessary.
To really understand one significant philosophical difference between Java and C++ you need to think in terms of Stroustrup's notion of invariants. The I first understood what he was really trying to say when I read this article on exception handling: http://www.research.att.com/~bs/eh_brief.pdf C++ ,in comparison to Java, assumes the programmer will pay closer attention to resource management in general. Thinking about efficiency is central to the use of C++. At first I thought that was a bit archaic in comparison to the Java way of thinking. Now I have come to believe it's a good thing. I'm currently working with 3D graphics. On a high-end modern system the efficiency of the program still counts for a whole lot. I believe this will be true for many other areas where it may seem less obvious, such as searching large bodies of data. -- Regards, Steven