The Source for Java Technology Collaboration
User: Password:



Start New Message Delete Post a Reply

Article: 
 Letter to the Editor
Subject:  4. Pros and Cons of Java versus other languages
Date:  2003-11-26 16:16:24
From:  johanley


Some pros
- it is very safe. Many other languages (C, C++) have items called "raw hardware pointers", which allow a programmer to refer to the location of items in memory. When mistakes are made with such pointers, then the program will often fail catastrophically. Not good. Java has pointers (since all object references are pointers) but they are not "raw" pointers, they are safe ones - the programmer cannot manipulate hardware addresses directly, and thus cannot make errors in manipulating them
- it has a extensive library of high quality. A "library" is rougly a collection of parts which may be used to build a program. A library implements a set of related programming tasks which may be easily reused by other programmers. I don't know of any other language which has such an extensive library as Java.
- it is well-behaved. It is easier to write programs which behave as expected. In C++, on the other hand, has many more subtleties which can trip up the unwary.
- it is very portable - "write-once, run anywhere"

Some cons
- Some parts of the Java libraries are harder to use than others
- it is not quite as fast as some other languages. The gap in performance was large in the early days of Java, but nowadays the speed of Java vs C, for example, is remarkably competitive. I remember seeing a measurement in 2001 that Java running on a server is about 80% the speed of comparable C, which is rather remarkable, actually.

 Feed java.net RSS Feeds