Java Is a 90s Kid

Ben Evans
97 Things
Published in
2 min readJun 18, 2019

There are only two kinds of languages: the ones people complain about and the ones nobody uses.

— Bjarne Stroustrup

Whether Stroustrup’s insight says more about programming languages or human nature, I’m not sure. However, it does draw attention to the often-forgotten truism that the design of programming languages is a human endeavor. As such, languages always carry traces of the environment and context in which they were created.

So it shouldn’t come as a surprise that traces of the late 1990s can be seen everywhere in the design of Java, if you know where to look.

For example, the sequence of bytes to load an object reference from local variable 0 onto the temporary evaluation stack is this two-byte sequence:

19 00 // aload 00

However, the JVM’s bytecode instruction set provides a variant form that is one byte shorter:

2A // aload_0

One byte saved may not sound like much, but it can start to add up over an entire class file.

Now, remember, in the late 90s Java classes (often applets) were downloaded over dialup modems, incredible devices that were capable of reaching blistering speeds of 14.4 kilobits per second. With that kind of bandwidth, saving bytes wherever possible was a huge motivation for Java.

You could even argue that the entire concept of primitive types is a combination of a performance hack and a sop to C++ programmers newly arrived in the Java world — products of the 1990s, when Java was created.

Even the “magic number” (the first few bytes of a file, which allow the operating system to identify the file type) for all Java class files feels dated:

CA FE BA BE

“Cafe babe” is maybe not a great look for Java today. Unfortunately, it’s not something that can realistically be changed now.

It’s not only the bytecode: in the Java standard library (especially the older parts of it), APIs that replicate equivalent C APIs are everywhere. Every programmer who’s been forced to read the contents of a file by hand knows that only too well. Worse yet, the mere mention of java.util.Date is enough to break many Java programmers out in a rash.

Through the lens of 2019, Java is sometimes seen as a mainstream, middle-of-the-road language. What that narrative misses is that the world of software has radically changed since Java’s debut. Big ideas such as virtual machines, dynamic self-management, JIT compilation, and garbage collection are now part of the general landscape of programming languages.

Though some may view Java as The Establishment, it’s really the mainstream that has moved to encompass the space where Java has always been. Underneath the veneer of enterprise respectability, Java is still a 90s kid.

--

--