It’s interesting to ponder whether this is where it all started for Google and Kotlin. As Tim Bray notes, it wouldn’t be the first time that Steve Yegge has moved the needle. Regardless, Google’s decision to anoint the language as a “first class citizen” for the Android platform is interesting news.
For many, if not most, it came with questions. Most obviously, what is Kotlin? Whatever the language’s merits, it has not been hugely visible historically. According to our language rankings, as one example, as of Q1 it ranked 50th. The language immediately ahead of it was Racket, with Mathematica just behind.
The short version is that Kotlin is a JVM-based language originally released in 2011 by the JetBrains (makers of IntelliJ) team from St Petersburg, Russia. Like Scala, an inspiration for the language, Kotlin is intended to improve on the Java foundations both syntactically and otherwise while trading on that platform’s ubiquity.
(Click to embiggen the chart)
Like most programming languages, Kotlin is permissively licensed (Apache 2.0). The project is open to outside contributors, and has had some notable ones with Netflix (1 commit), Cornell (79) and Square (3) email addresses listed in the commit logs (James Strachan, of Groovy fame, checks in with 650 commits, interestingly). But as you can see above the overwhelming majority of development is done by JetBrains, though it’s important to observe that the generic @gmail.com addresses which are collectively the second largest contributor can obscure contributors from other organizations who choose to use their personal email addresses rather than their employer issued one. Note also that the graph above conflates @jetbrains.com and @intellij.net addresses, and that localhost rolls up everything obviously local.
With Google’s new commitment, it will be interesting to see if the ratio of internal to external contributors changes over time. For the moment, however, there are several reasons to pay close attention to Kotlin.
- It’s Like Swift:
Or, as Steve Yegge reminds us, Kotlin predates Swift so it’s technically more accurate to say that Swift resembles Kotlin – closely. Either way, it means that the syntax for Kotlin, like Apple’s Swift, is clean and modern. The reaction amongst developers learning Kotlin is not dissimilar to the initial experiences with Ruby years ago, in that the syntax is so intuitively designed that even without any exposure it’s almost possible to guess it. This is an advantage in any case, but when it’s the alternative to a language like Java – a language that, for all its strengths, is not known for its syntactical beauty – syntax becomes a killer feature.
It’s Java Compatible:
While Kotlin breaks with Java on multiple fronts, its ability to both leverage the JVM and interoperate and intermingle with Java code is enormously important. One obvious question following the discovery that Kotlin and Swift were syntactically similar was why would Google try and elevate a language that was well regarded by a small number of developers to a position of prominence from relative obscurity? The answer is Java compatibility. This is a killer feature for Google with Android, but also provides the language with a very interesting opportunity to find its way into the many other areas – not just enterprise – that Java has colonized before it.
Its Tools Are Top Notch:
The importance of tooling support has been undervalued in recent years, in part because the tradeoffs typically imposed by an IDE are less compelling for dynamic language developers than their compiled counterparts. This is particularly notable in cloud platforms; for all the meteoric growth, the typical development experience for most cloud developers is more rudimentary that might be expected. Kotlin’s tooling story is different, to the point that the enthusiasm in this description by Yegge is actually common:
The IDE support for pretty much every other JVM or Android language (besides Java) tends to be bolted on by a couple of community volunteers. Whereas Kotlin is made by world-class IDE vendors, so right from the start it has the best tooling support ever. How many languages can you name that were built with IDE support from the ground up?
While tooling isn’t likely to be the primary differentiator for a runtime, all things being equal excellent tooling is an important advantage.
It’s an Officially Sanctioned Android Language:
Many have called Android Kotlin’s killer feature, and based on history this is a reasonable argument to make. Consider the case of Swift. Released in 2014, Swift debuted on our language rankings chart at #68. Two quarters later it was at #22. It’s currently tied for #11. In the history of RedMonk’s rankings, a programming language has never risen that quickly. The closest was Go, but Swift has not only grown more quickly, it has passed the infrastructure-centric language which lists at #15.
Swift’s growth was, of course, driven by iOS. Prior to its introduction, Objective-C was that platform’s supported development language. If the goal is to compare the opportunity in front of Kotlin to Swift, then, the obvious question is about size of target. While there are obviously other factors to consider – Java and Objective-C have very different user populations, for one – consider the public numbers.
The iPhone was launched in June of 2007. Eight years and seven months later, January 2016, Apple announced it had hit one billion active devices. Android, meanwhile, was first released in September of 2008. Eight years and eight months later, May of 2017, Google claimed it had 2 billion active devices.
Even if those numbers are heavily discounted, the target is large. And given that as Google’s Chris DiBona has said, “There is a linear relationship between the number of phones you ship and the number of developers,” it seems safe to assume that Kotlin is in line for a significant boost.
Features and performance notwithstanding, RedMonk believes that developers are the constituency most likely to sift winners from losers. For Kotlin, this is excellent news, because the language’s supporters are not just positive they are ecstatic and evangelistic. It’s one thing to use a technology because it gets the job done or because it’s ubiquitous; it’s quite another for it to also be likeable. By all accounts, regardless of its other strengths, Kotlin is a language that is adored by users in a fashion that is rare.
What’s next for Kotlin, then? The data available is obviously limited as Google’s news is a week old, but what there is is suggestive.
On GitHub, for example, Kotlin’s base repo was the unsurprising winner amongst trending repositories. Clocking in at number five, meanwhile, was this repo containing a cheat sheet on moving from Java to Kotlin.
Google Trends, meanwhile, recorded a predictable surge in Kotlin (the programming language, not the island it’s named for) queries.
The Stack Overflow data was notable for two reasons. First, because of the spike this month. The bars on that chart are monthly aggregates of tag counts for Kotlin, and May’s count is easily the highest and it’s only halfway through the month. More interesting, however, is the notable uptick in activity late in 2015 and ramping up in 2016. The cause isn’t provable, but is likely the result of early Android experimentation. Whatever the cause, the accelerating traction is certainly reflective of the “low-key buzz” that attracted Yegge and others’ attention.
It’s impossible to say that it’s early days for a six year old programming language, but it’s also inarguable that Google’s decision to support the language on the most popular mobile platform in the world is a game changer. The worst case outlook for Kotlin would seem to be the modern, default choice for development for Android moving forward. Its best case scenario, however, is far more interesting. Advocates of Apple’s Swift – including major Java supporter IBM – have been attempting to expand that language’s horizons outside Apple’s mobile platform and establish it as a credible server-side language for the enterprise based in part on its clean modern design and implementation. In Kotlin, however, enterprises potentially have a language with many of the benefits of Swift but that is compatible with their Java based investments past, present and future. In other words, the boost to Kotlin in mobile could lead to an equally bright outlook on the server.
There’s a long way to go before the language realizes that future, of course, but it’s possible that in seeking a modern path forward for its Android platform Google may have inadvertently created one for traditional enterprise Java users as well.