Subscribe / Unsubscribe Enewsletters | Login | Register

Pencil Banner

Java at 20: How it changed programming forever

Elliotte Rusty Harold | May 22, 2015
Java synthesized sound ideas, repackaging them in a practical format that turned on a generation of coders.

Remembering what the programming world was like in 1995 is no easy task. Object-oriented programming, for one, was an accepted but seldom practiced paradigm, with much of what passed as so-called object-oriented programs being little more than rebranded C code that used >> instead of printf and class instead of struct. The programs we wrote those days routinely dumped core due to pointer arithmetic errors or ran out of memory due to leaks. Source code could barely be ported between different versions of Unix. Running the same binary on different processors and operating systems was crazy talk.

Java changed all that. While platform-dependent, manually allocated, procedural C code will continue to be with us for the next 20 years at least, Java proved this was a choice, not a requirement. For the first time, we began writing real production code in a cross-platform, garbage-collected, object-oriented language; and we liked it ... millions of us. Languages that have come after Java, most notably C#, have had to clear the new higher bar for developer productivity that Java established.

James Gosling, Mike Sheridan, Patrick Naughton, and the other programmers on Sun's Green Project did not invent most of the important technologies that Java brought into widespread use. Most of the key features they included in what was then known as Oak found its origins elsewhere:

  • A base Object class from which all classes descend? Smalltalk.
  • Strong static type-checking at compile time? Ada.
  • Multiple interface, single implementation inheritance? Objective-C.
  • Inline documentation? CWeb.
  • Cross-platform virtual machine and byte code with just-in-time compilation? Smalltalk again, especially Sun's Self dialect.
  • Garbage collection? Lisp.
  • Primitive types and control structures? C.
  • Dual type system with non-object primitive types for performance? C++.

Java did, however, pioneer new territory. Nothing like checked exceptions is present in any other language before or since. Java was also the first language to use Unicode in the native string type and the source code itself.

But Java's core strength was that it was built to be a practical tool for getting work done. It popularized good ideas from earlier languages by repackaging them in a format that was familiar to the average C coder, though (unlike C++ and Objective-C) Java was not a strict superset of C. Indeed it was precisely this willingness to not only add but also remove features that made Java so much simpler and easier to learn than other object-oriented C descendants.

Java did not (and still does not) have structs, unions, typedefs, and header files. An object-oriented language not shackled by a requirement to run legacy code didn't need them. Similarly Java wisely omitted ideas that had been tried and found wanting in other languages: multiple implementation inheritance, pointer arithmetic, and operator overloading most noticeably. This good taste at the beginning means that even 20 years later, Java is still relatively free of the "here be dragons" warnings that litter the style guides for its predecessors.

 

1  2  3  Next Page 

Sign up for CIO Asia eNewsletters.