arXivDaily arXiv每日学术速递 周一至周五更新
北美退伍军人节(Veterans Day),12 日无更新
arXiv 1907.09003cs.SE
收藏

关于Android开发中Kotlin特性的采用、使用和演变

On the adoption, usage and evolution of Kotlin Features on Android development

Bruno Góis Mateus, Matias Martinez

摘要:

背景资料:Google在2017年宣布Kotlin为Android官方程序设计语言,让开发人员可以选择使用结合了面向对象和函数功能的语言编写应用程序。目的:本文的目标是从四个方面了解Kotlin特性的使用情况:i)采用了哪些特性,ii)采用的程度如何,iii)这些特性何时首次添加到Android应用程序中,iv)特性的使用如何随着应用程序的发展而发展。方法:通过研究387个Android应用程序的源代码,我们确定了Kotlin功能在每个版本应用程序版本上的使用情况,并计算了每个功能首次使用的时刻。最后,我们确定的演变趋势,更好地描述了这些功能的使用。结果:26项功能中有15项至少在50%的应用程序中使用。此外,我们发现类型推断、lambda和安全调用是最常用的特性。此外,我们观察到,最常用的Kotlin功能是Android应用程序中首次包含的功能。最后,我们报告说,大多数应用程序倾向于添加更多的26个功能中的24个功能的实例。{ \bf结论:}我们的研究产生了7个主要发现。我们提出了他们的影响,这是针对开发人员,研究人员和工具构建者,以促进使用Kotlin功能来开发Android应用程序。

英文摘要:

Background: Google announced Kotlin as an Android official programming language in 2017, giving developers an option of writing applications using a language that combines object-oriented and functional features. Aims: The goal of this work is to understand the usage of Kotlin features considering four aspects: i) which features are adopted, ii) what is the degree of adoption, iii)when are these features added into Android applications for the first time, and iv) how the usage of features evolves along with applications' evolution. Method: Exploring the source code of 387 Android applications, we identify the usage of Kotlin features on each version application's version and compute the moment that each feature is used for the first time. Finally, we identify the evolution trend that better describes the usage of these features. Results: 15 out of 26 features are used on at least 50% of applications. Moreover, we found that type inference, lambda and safe call are the most used features. Also, we observed that the most used Kotlin features are those first included on Android applications. Finally, we report that the majority of applications tend to add more instances of 24 out of 26 features along with their evolution. {\bf Conclusions:} Our study generates 7 main findings. We present their implications, which are addressed to developers, researchers and tool builders in order to foster the use of Kotlin features to develop Android applications.

机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。

↑