Advertorial Erste Bank |“Java is dead, long live Java“
Java is an island in Indonesia with approximately 150 million inhabitants and occupying an area of about 150,000 km2. It also used to have Javan tigers and elephants, but because of humans’ never-ending greed for resources, these animals are now unfortunately extinct.
Java is also a programming language invented 1995 by Sun Microsystems, which itself was bought by Oracle in 2009. It is designed to be a general-purpose (4th generation) language, meaning it is not tied to any specificuse case, but rather can accomplish anything from serving as a local texteditor to being a full-fledged server application. It also belongs to the family of object-oriented languages that model the world in terms of objects communicating with each other. However, the great advantage of Java lies in its so-called „Java Virtual Machine“ (JVM). JVM allows you to write your code once and run it literally everywhere, as Java is compiled to an intermediate format called „Bytecode“ that is later on interpreted bya JVM. It could be a huge server, a powerful workstation, a regular PC/laptop, a small phone (Android apps are all written in Java and run a JVM) or even embedded on an IoT device. Compared to languages such as C, in which the developer must allocate/deallocate memory on their own (leading to possiblesoftware bugs), Java has a so-called “garbage collector” that takes care of the memory management.
Apart from the language itself, one of Java’s most convincing benefits lies in its enormous ecosystem. Applying a rather communitarian approach, Java’s software and libraries are written freely by the people and for the people in the so-called „Open Source Community“. The licenses being used are even very enterprise-friendly, so it is a very common thing to use, develop and contribute Open Source libraries in almost any job working as a Java developer. Due to Java’s dominance among all of the programming languages out there, the community around it is beyond imagination, leading to a vast amount of documentation, tutorials, how-to’s, stackoverflow Q&A’s, and so forth. There is little chance when you encounter any problem with Java that there hasn’t previously been someone else facing the very same issue. Furthermore, the reason why it became such a success was not only the abstraction of the operating system via a JVM, but also its conciseness (atleast that was the case 20 years ago), its performance and reliability (something the industry strives for) and, of course, the backwards compatibility (a two-sided sword).
More than 20 years after the invention of Java, the world has changed drastically. Many new and also a lot of refurbished older concepts have conquered the lives of today’s software developers, such as the functional programming paradigm and concurrency capabilities. Because of the very enterprise-focused nature of Java (think of big Oracle), backwards compatibility is a major thing.
You cannot simply introduce breaking changes in the language, as this will ruin most of your customers’ code, projects which don’t have any budget anymore to be rewritten with the new language version in order to make it run again.
Given the interests of the large industry that they serve, the people behind Java are very conservative in their approach; the impact of this stance is amplified by the fact that not all of those modern language concepts are implemented in Java. As stated in the introductory paragraphs, Java is not only a language (and not only an island), but also a platform providing a runtime environment (JVM) and a huge set of ready-to-use frameworks and libraries. In combination with the fact that the JVM runs bytecode (which is the compiled output of a Java compiler), a lot of different languages have tried to „infiltrate“ that platform, with more or less success, over the past decade. With only one exception so far: Kotlin.
Kotlin seems to be a worthy successor to Java, as it is aims to be „industry compliant“ and promises 100% interoperability with Java, meaning you can have Kotlin and Java live side-by-side in your project, enabling a smooth migration. Today, Kotlin’s growth is outstanding, with the language enjoying backing from JetBrains (the company behind the most famous IDE IntelliJ), support from major libraries like the Spring Framework, and even Google announced its support for Kotlin by declaring it an official supported language for Android (previously, only Java had had this status). It looks like we can keep the platform, the community, the ideology of Java, while still replacing the (pretty much outdated) language with something new, going on a journey of a gentle evolution, rather than a big-bang revolution. Regardless of which language you are using (frankly, I think most of the time the reason why we choose one language over the other is merely based on personal preference — of course, exceptions do exist), as engineers we should always strive for perfection, elegance and pragmatism.
You cannot simply introduce breaking changes in a new language version, as this will most likely ruin most of your customers’ projects. Those projects are often then in active development or don’t have any budget anymore to be rewritten with the new language version in order to make it run again.
Christoph Pickl, conservative backend developer for 17 years