Keywords
type inference, empirical study, Java 10, static analysis
Abstract
Type Inference is used in programming languages to improve writability. In this paper, we will be looking more specifically at Local Variable Type Inference (LVTI). For those unfamiliar with LVTI, we will also give an in-depth explanation of what it is and how it works. There is a lot of debate surrounding Type Inference in modern day programming languages. More specifically, whether the costs associated with LVTI outweigh the benefits. It has found its way into many higher-level languages including C#, C++, JavaScript, Swift, Kotlin, Rust, Go, etc. In this paper, we will look at the usefulness of LVTI and its popularity since the release of Java 10. Our study will show that LVTI in Java has not received widespread adoption. We will also explain a possible reason for this is based on the information we have gather from our empirical study which involved statically analyzing 6 popular open source Java 10 projects. We will also discuss different scenarios in which Type Inference can obscure different programming errors.
Recommended Citation
Liddell, Clayton and Kim, Donghoon
(2019)
"Analyzing the Adoption Rate of Local Variable Type Inference in Open-source Java 10 Projects,"
Journal of the Arkansas Academy of Science: Vol. 73, Article 12.
https://doi.org/10.54119/jaas.2019.7311
Available at:
https://scholarworks.uark.edu/jaas/vol73/iss1/12