Support for a language is dependant on the popularity of that language. The only possible risk in choosing kotlin is the project becoming an orphan as kotlin never gains sufficient traction in the relevant space. Choosing any language on the assumption that popularity will increase is a gamble, so understanding the popularity of kotlin now and are the prospects for future popularity is essential in understanding the risk of future kotlin support.
Depending on the language popularity indicator you reference, kotlin is either climbing the rankings or already very near to top. Kotlin on Android is widely tipped to overtake Java as the number 1 language, and choosing the number 1 language cannot really be considered a risk. Could choosing Kotlin for development other than Android still be considered a risk, given the positive signs for kotlin uptake?
- Popularity: what do the numbers really say?
- Android a special case?
- Non Android Java projects
- C/C++ uptake
- Python, PHP and Ruby
Popularity: what do the numbers really say?
How do you measure popularity?
One approach is to track how often a language is mentioned in searches(such as Tiobe or Pypl), another is by questions asked or questions asked (such as stack exchange tags), and a third is by the other is by specifically recording ratings or language preferences. The mentions approach is somewhat reminiscent of what drives fake news, and it would seem by such a mention that at the date of this post (Oct-Nov 2017) Harvey Weinstein has just rocketed in popularity because he has been mentioned far more often lately, but unfortunately those mentions have been for the wrong reason. It could also be argued that complex logic and lack of specific community forum is going to drive more questions on stack exchange, but at least the likes and dislikes should accurately reflect sentiment on a language if not necessarily how many people are acting on that sentiment.
Update: Although this page from tiboe in November 2017 was published after this pages initial publication, I feel it is very relevant:
November Headline: What happened to the scripting languages?
There has been a time that dynamically typed languages, also known as scripting languages, were the future. Easy to write, easy to run. Why do you need to declare a variable before you can use it? Why do we have to use all these type annotations all the time? As a consequence, languages such as Perl, Python, PHP and Ruby were very popular in those days.
On the other hand, the statically typed languages responded to the threat of scripting languages by reducing their type verbosity: it all started with the “var” keyword in C#, followed by type inference in Java and auto specifiers in C++. And this is how the big languages always seem to survive: by cherry picking the nice and promising features of their competitors.
The ‘Popularity’ Indicators.
What does it all mean?
The data suggests programmers prefer Kotlin, Typescript and Rust, but the largest codebase is Java, C, C++ and Python. Codebase for the liked languages should grow if they can achieve credibility and stay liked, and codebases for the disliked languages would be expected to slowly diminish if they programmers have any choice. Change in the codebase generally changes slowly, Java has been the topic language in the ‘popularity’ rankings since the year 2000, but on a negative trend over that entire time even though on most data is still retains that most dominant position.
- Most lines of Code: Java (most liked a long time ago)
- Most preferred to write code now: Kotlin, Rust (the current favourites)
Java was extremely popular, then dynamic languages took over, but have generally lost their appeal. What developers want right now is a statically typed, concise expression language. Kotlin is an exact fit. It takes along time for the desires of developers to translate into the number on the indexes, which reflect what is used, or was used to write the code that is out there. So the current desires of developers have to stay in place for a long time for what they want to become popular in the popularity indexes. I will post separately analysing the merits of what is currently popular, to see if this is a fad and the dynamic scripting languages will make a comeback, or the concise static typed languages really are the future.
The caveat is that limitations on collection of the data means all the figures are open to interpretation.
Android a special case?
Kotlin is strongest in Android. Is that strength artificially created by something special about Android, or likely to spread to other uses of kotlin? As stated before, graphs like those available on the tiobe rankings, show Java as being dominant but in decline almost since the year 2000. On the liked scale the Java language does not rank well, so this would make the dominance of Java on android, imply that programmers in 2009 when Java was not liked chose Java to develop their Android Apps Question: Why did programmers choose to program in Java in 2009? Answer: It was really the only language choice available.
Although only hitting the big time in 2009, the operating system that took the name android was the evolution of a concept dating much earlier, and the idea of the Java Virtual machine was central to the original concept of an OS for small devices which could use incompatible CPUs.
The end result was that for a long time, the best language in practice to use to program Android was not necessarily their own choice. This is despite Android development being heavily biased towards Technology Product Software Engineers who are the most likely to choose their own language when possible, and are generally ready to embrace the cutting edge. I suggest this created a pent up demand for a new language choice in the Android community.
Quite a number of high profile developments did not even wait for Kotlin 1.0. However Kotlin became more attractive as an alternative for many with the release of kotlin 1.0 in very early 2016. Others may have been waiting for the announcement in May 2017 by google of official support for kotlin.
But most projections show Kotlin will overtake Java on Android by the end of 2018, while I have not seen any suggestion that Kotlin will be even close to overtaking Java overall in 2018. Outside of Android, any takeover would take much longer.
Clearly Android is a specific arena, with different dynamics for the choice of language that applies elsewhere.
Non Android: Java vs Kotlin
I suggest that outside Android, the use of Java is heavily biased towards Bespoke Corporate Software, as opposed to Technology Product software. I suggest this means the people using Java outside of Android are more conservative with their language choices. Bespoke corporate software is often specified by a group quite separate from the programmer, and the customer is always right. With technology products it is more the programmers choice. Consider for Bespoke software, a bank (the ‘customer’) may specific the language they want one of the systems written with, while for Product Software (e.g. a new android game), the customers for the game are not likely to specify what language the program is written with.
If you want adoption of a new language, perhaps it takes the Technology Product Software industry to lead the change, and through Android, perhaps Kotlin has already converted the major group of Product Software engineers who would have been programming in Java.
Conclusion: Non-Android Java adoption shows far slower adoption of kotlin than has been the case with Java for Android. Further kotlin adoption through Java from non-Andoid alone could stall growth of kotlin.
C/C++ As the Next Target?
If Tiboe alone is used as the reference of language popularity, then C/C++ is the next place to look for programmers who could adopt kotlin. Kotlin native, opens this path, and the choice of IDE (CLion) suggests C/C++ programmers are the target market. This is a great move, but if you consider pypl together with tiobe, the overall conclusion of falling popularity of C/C++ is that use for new projects is low (as is also the case with Java).
Python and PHP ?
If the most of Java developments outside of Android are indeed Bespoke Corporate projects, and the Kotlin popularity growth fed by winning over Java projects may now plateau, could enticing Python PHP and Ruby developers be a key source of continuing the popularity rise?
Certainly Python, Php and Ruby projects should consider the ‘static types for mature projects’ as some motivation. In numbers, pypl would suggest there once python and php are combined the numbers exceed those of java, and that is even before excluding android java programmers to focus only on non-android java programmers. Stackoverflow has more questions tagged python than are tagged java.
Clearly the python/php/ruby group is the largest group current not specifically targeted by an kotlin initiative.
Also, clearly a larger group than non-android Java programmers. So the biggest potential probably lies within this Python/PHP/Ruby group, but what can be done to win them over?
Just like the original success of kotlin with Android, the source of new recruits can be a surprise, but Jetbrains may respond well once the move starts. The main need to capture this group is the focus on getting the very first simple program going, and that includes managing that if gradle is the preferred build tool, how can it be as simple as possible for the minimum project.
Success here will likely have the biggest impact on the future of kotlin.
What are the challenges?
The two new initiatives are kotlin native as a C/C++ alternative, plus positioning kotlin as a cross platform mobile solution contender with though the addition of iOS support. Kotlin native vs rust? How about sharing code base from browser to JVM.
Probably biggest question is to how can kotlin become a kotlin alternative, which means easy for simply projects and a large base of libraries that are simple to access.
Use of kotlin beyond android, still comes as some level of risk of becoming an orphan. The needs at risk if interest drops are:
- development tools (safe, given Jetbrains commitment)
- libraries (safe only for Android at this time, uptake dependant)
- peer support (assisted by discuss, but uptake dependendant)
Kotlin is well placed to pick up on the move from older static typed languages, but little is in place at this stage for kotlin to score wins from the dynamic languages.
For each development type covered in implementation pages, I will add a risks section to the relevant Implementation page. So refer to that section for specific risks. At the moment, kotlin has interest levels beyond its actual measured popularity, because of rising popularity. The questions is what happens if there is a popularity plateaux.
1 thought on “Kotlin beyond Android: A risk?”
Nice reading. Great site!