View this PageEdit this PageAttachments to this PageHistory of this PageHomeRecent ChangesSearch the SwikiHelp Guide
Hotspots: Admin Pages | Turn-in Site |
Current Links: Cases Final Project Summer 2007

Discussion 1 - Daniel Kitchener

Manabu Shimobe argues that Java is better for cross-platform use than C++ but that C++ is higher-performance. I agree entirely with this. Because Java is interpreted, it has a higher runtime than C++, but because it is interpreted, you can run it on as many types of machine you want to, as long as there is a Java VM for the machine architecture.

In his paper, A survey of distributed languages,Alex Nicolaou discusses the differences between Java, Python, and Phantom, all of which are interpreted object-oriented programming languages. "Interpreted" of course refers to the fact that the languages are compiled to bytecode and then run on a virtual machine. Nicoloau clearly favors Java over Python and Phantom because of its speed and ease of use. However, he has some pretty valid reasons.
The first key difference is in how they actually handle classes and inheritance. In Java, you can have two different styles of inheritance. A class can extend another class, which is the more traditional form of inheritance. But also, Java has interface inheritance, in which one class implements another. This much simplifies multiple inheritance, as you only have to worry about one class extending one other class. In Phantom, there is no multiple inheritance at all, which simplifies the language but at the same time makes it less-powerful. However, Phantom has an interesting way of implementing data abstraction. Instead of private, protected, and public like there is in java, Phantom uses read/write/execute permissions like unix does. Python, meanwhile, has absolutely no data abstraction at all. This means that programming large projects would be a real hassle. Programmers have to be really careful, as classes have no way of protecting or hiding their objects. So, some dumbass programmer could easily change some variable or value that the class needs. Python is pretty similar to Smalltalk in that it is a typeless language, meaning that parameters of any type are permitted as long as they have the correct members.
Now, what the lack of multiple inheritance in Phantom means is that users must simplify their programs and cannot have complicated classes that take from 3 or 4 other classes. A class can extend a GUI class, but at the same time it cannot also implement a listener class. In Java, we can do this, which makes class diagrams more complicated, but programming easier.


Links to this Page