Programming and Problem Solving with Java

(やまだぃちぅ) #1
3.4 Simple Arithmetic Expressions | 113

The Origins of Java


If we were to chart the history of programming languages, we would find several distinct fami-
lies of languages that have their origins in the early days of computing. When the idea of high-
level languages first arose, it seemed that everyone had his or her own notion of the ideal form
for a programming language. The result—the Tower of Babel period of programming languages.
As more programs were written, the cost of rewriting them to use the features of a new
language increased, so the computing world began to concentrate on a few languages. These
included Fortran, Algol, COBOL, Basic, PL/1, Lisp, and BCPL.
As computers were used in more sophisticated ways, it became necessary to create more
powerful languages. In many cases, these new languages were just expanded versions of older
languages. Expanding a language allows older applications to be used unchanged, but enables
programmers to add to applications using the language’s new features. This strategy is known
as upward compatibility. A good example is the Fortran series that began with Fortran, then
Fortran II, Fortran IV, Fortran 77, Fortran 90, and High-Performance Fortran.
Sometimes, however, extensions to a language result in excess complexity. The solution is to
redesign the language to eliminate conflicting features while preserving its desirable qualities.
For example, Pascal replaced the Algol language series and was itself superseded by the Modula
series of languages. Java is a redesign of languages derived from BCPL (Basic Combined
Programming Language).
In the 1960s BCPL had a small but loyal following, primarily in Europe. It spawned another
language with the abbreviated name of B. In the early 1970s, Dennis Ritchie, working on a new
language at AT&T Bell Labs, adopted features from the B language and decided that the succes-
sor to B naturally should be named C.
In 1985, Bjarne Stroustrup, also of Bell Labs, invented the C++ programming language by
adding features for object-oriented programming to the C language. Instead of naming the new
language D, the Bell Labs group named it C++ in a humorous vein: ++is the increment operation
in C, so the name C++ suggests it is the successor of the C language.
C includes many features that are close to the level of machine code, allowing programmers
to write detailed instructions for the computer. C++ adds features that enable programmers to
write instructions at a very powerful and abstract level that is far removed from machine lan-
guage. If used with care, this combination of features enables programmers to “shift gears” be-
tween easily programming complex operations and writing instructions that are close to
machine code. Many people find it difficult to keep the features separate, however, and view
the combination as fraught with potential for introducing errors.
In the early 1990s, James Gosling, working at Sun Microsystems, needed a language for pro-
gramming the microprocessors being used in consumer electronics (for example, digital cam-
eras). Like Stroustrup, he began with C. Gosling, however, decided to eliminate features that
would conflict with the structures that he was adding. The Algol family of languages as well as
several experimental programming languages inspired some of the new features. Gosling
called his language Oak, and he spent several years experimenting with it and refining it. When
the popularity of the Internet began to grow, Gosling worked with a team of designers at Sun to
adapt Oak for writing applications that could operate over the network. The revised language
was renamed Java and released to the public in May 1996.
Java offers many of the capabilities of C++, albeit in a less complicated fashion. It supports
programming for the Internet and writing applications with graphical user interfaces that are
now the standard for interactive I/O. In addition, Java applications are highly portable. These
features combined to cause the popularity of Java to skyrocket in the first year after it was
released. It is very rare for a new programming language to appear and achieve success so
quickly. Because Java is powerful yet simple, it has also become popular as a language for
teaching programming.

Free download pdf