Abstract
With the introduction of parametric types in Java, the type system becomes more complex to handle. The Java generics requires more programming efforts to instantiate appropriate types. In such a situation, a sound type inference algorithm may reduce programming load and ensure safety. Java type inference algorithm has eased programming efforts by reducing explicit instantiation of types. The Java type inference algorithm is being expanded. Still, the impact of inference in mainstream programming is limited. Moreover, the unsound approach for inference causes unpredictable behavior in program code. The limitations and unsoundness of Java type inference need to be discussed to avoid the failure of codes. In this paper, we discuss limitations and issues of type inference algorithm, such as the incapability to infer wildcards as return type in generic methods, and limitations of local variable type inference. Further, we discuss how the machine learning approaches can help to develop a safe type inference algorithm.
Talk to us
Join us for a 30 min session where you can share your feedback and ask us any queries you have
Disclaimer: All third-party content on this website/platform is and will remain the property of their respective owners and is provided on "as is" basis without any warranties, express or implied. Use of third-party content does not indicate any affiliation, sponsorship with or endorsement by them. Any references to third-party content is to identify the corresponding services and shall be considered fair use under The CopyrightLaw.