|Why Do Android Devs Convert To Kotlin?|
|Wednesday, 01 April 2020|
Not just why, but how? Moving an app from an existing language to a new one isn't something that happens every day, but since the advent of Kotlin it's more common than it was. So what is Java to Kotlin all about?
Some new research based on an interview technique and a program that analyses code repositories aims to answer the why and the how of Kotlin migration. There is a full account of the methodology in the research paper, but it is worth extracting the main findings and thinking about them a little.
The first question is: How many Android applications have been fully migrated to Kotlin?
We know from Google that Kotlin is a growing force and it shouldn't be a surprise to learn that of 374 apps 86 (30%) have been 100% migrated to Kotlin - that's a lot of work - or is it? Of the migrated applications, 36% were completely migrated in a single commit. Others migrated slowly from one language to the other and partial migrations accounted for 63% of the 214 apps that included Kotlin code.
Of the people who didn't do a complete migration the reasons for not doing so were:
So why migrate at all? The survey concludes that there were four reasons:
I think a. and c. are very similar, but d.? Does anyone do what Google tells them? And did no one think that moving to Kotlin might provide some protection from fallout over the Oracle v Google lawsuit?
And what advice is there if you are thinking of migrating:
So should you migrate?
I would say the answer is very much yes, but I don't think you have to make a complete migration. Writing new code in Kotlin is a good start and see how it progresses. The good news is that Kotlin and Java work together.
How and Why did developers migrate Android Applications from Java to Kotlin? A study based on code analysis and interviews with developers Matias Martinez and Bruno Gois Mateus
or email your comment to: email@example.com
|Last Updated ( Wednesday, 01 April 2020 )|