Kotlin Was Predicted to Overtake Java by December 2018. What Happened?
In 2018, the Realm Report predicted that Kotlin, a cross-platform programming language, would overtake Java by the end of the year. Was the forecast accurate?
Join the DZone community and get the full member experience.
Join For FreeGoogle officially added Android support for Kotlin, an open-source Java alternative, back in 2017. Since then, the programming language has exploded in popularity. It's used by more than 60% of professional Android developers and is the default choice for new projects in Android Studio.
In 2018, Realm, a mobile development platform, released a report claiming that Kotlin would overtake Java by the end of the year. The report was compiled based on the findings from more than 100,000 active and sophisticated developers building mobile applications using the Realm Database installed on more than 3.5 billion iOS and Android applications including Starbucks, SAP, eBay, Intel, and Alibaba.
While the report is no longer publicly available, it offered a detailed look at the tools and techniques being utilized by mobile developers. It's a valuable snapshot into the state of mobile development at the time the report was published. The report's key findings suggested that:
Developers Were Rapidly Migrating to Modern Languages
Java is losing developer mind share quickly - the percentage of applications built using Java had already decreased by 8.8% from 50.7 to 46.2% of overall apps over the past four months.
Kotlin adoption was exploding - the number of applications using Kotlin had already grown by 125% on the heels of Google's support, officially making Kotlin a first-class language for writing Android apps at Google I/O in May.
20% of Kotlin apps built since Google I/O had previously been built with Java.
Based on the data, Kotlin was predicted to overtake Java in December 2018 -- 17 months after Google announced official support at Google I/O. In contrast, it took 14 months for Swift to reach the same milestone versus Objective C for iOS app deployment.
The Home Base for iOS Was in the West
For iOS, Germany and the U.S. were at the top -- iOS 11 was announced in June 2017, and developers in Germany, the U.S., and Great Britain emerged as the fastest to develop applications that took advantage of the new mobile operating system.
Western countries drop old iOS versions faster -- in the U.S., 48% of mobile developers had already stopped developing for iOS 8.
Asia Leads the Pack With Android
Russia and Japan helped lead the way - developers in Russia (24%) and Japan (18%) were among the fastest to target Android Oreo since its beta launch in May 2017, while U.S.-based developers ranked fourth.
While the predictions made in the report weren't entirely correct, Kotlin has seen tremendous growth since its release. JetBrains recently released the Kotlin 1.7.0 beta, which restores min(), max(), minBy(), maxBy(), minWidth() and maxWith() collection functions. The latest version of Kotlin also improves builder interference and stabilizes non-nullable types.
Even though Java is known for its robust coding, its syntax can be cumbersome, especially when compared to other programming languages. Java also takes up a lot of system memory, which makes it slow and can sometimes cause issues with Android API.
When JetBrains created Kotlin, they strove to create a tool that solved the challenges of working with Java. Kotlin offers full Java compatibility and can be utilized anywhere that Java can, but it offers features and functionality that Java is lacking.
One of Java's biggest problems is the NullPointerException (NPE), a runtime exception that can lead to error messages. Kotlin automatically fails during complication if there's a potential NPE, preventing costly issues. The Null Safety features that are built into Kotlin are invaluable.
In addition, Kotlin is a functional programming language by design. Not only does it offer a superior type system, but it makes it possible to do more with less code. It can use every existing Java framework, but it doesn't have Java's flaws. Kotlin is secure, easy to learn and use, and has many benefits for businesses.
Since Kotlin is interoperable with Java, there's no real risk for businesses that choose to adopt it. Even developers that are new to Kotlin can learn the code very quickly. On top of that, Kotlin has a better customer service team than Java does, which means it's easy to get support when you encounter a problem.
The strong community around Kotlin means that the programming language is constantly improving. While Java is far from obsolete, Kotlin has already surpassed Java in a number of ways. Even though Java hasn't disappeared, Kotlin has weakened the hold it has on the IT sector.
Some of the biggest IT companies in the world use Java, including Amazon, Google, and Netflix. Kotlin is also used by major web portals that see heavy traffic, like FourSquare and Pinterest. The programming language has even been adopted by businesses in the financial sector, like Capital One.
Kotlin also compares favorably to other Java competitors, like Scala. Like Kotlin, Scala is a general-purpose programming language that offers interoperability with Java. However, Scala has a slower compile time than Kotlin and is less efficient overall.
It's safe to assume that Kotlin will continue to eclipse Java, but that doesn't mean that Java is fading away. Since the release of the 2018 RealmReport, Java has continued to release updates and make improvements. JDK 16, which was released in 2021, introduced features like instantof pattern matching and 58 new API elements.
Why has Java continued to be a major competitor in spite of the numerous advantages that Kotlin offers? Java primarily owes its continued success to its long history. Surveys show that Java is still the preferred programming language of many developers.
Realm wasn't the first platform to predict the fall of Java, and they won't be the last. Due to its age and weaknesses, the future of Java has been called into question many times. Even though some developers have phased out Java, it's continued to be one of the most popular programming languages in the world.
With that said, Realm was right to highlight Kotlin. Over the years, there have been plenty of programming languages that have fallen to the wayside, but Kotlin has shown that it has real staying power. It may be a young programming language, but it's been adopted at a very fast rate, and it's clear that it has yet to reach its peak.
Kotlin may not have overtaken Java quite yet, but it's become one of the most in-demand programming languages in the world. It's positioned itself as a true Java competitor, and it's still very possible that it will fully overtake Java at some point in the future.
Opinions expressed by DZone contributors are their own.
Comments