Object-oriented type inference
OOPSLA '91 Conference proceedings on Object-oriented programming systems, languages, and applications
Subtypes vs. where clauses: constraining parametric polymorphism
Proceedings of the tenth annual conference on Object-oriented programming systems, languages, and applications
Sound polymorphic type inference for objects
Proceedings of the tenth annual conference on Object-oriented programming systems, languages, and applications
ACM Computing Surveys (CSUR)
Proceedings of the 24th ACM SIGPLAN-SIGACT symposium on Principles of programming languages
Featherweight Java: a minimal core calculus for Java and GJ
Proceedings of the 14th ACM SIGPLAN conference on Object-oriented programming, systems, languages, and applications
Precise Constraint-Based Type Inference for Java
ECOOP '01 Proceedings of the 15th European Conference on Object-Oriented Programming
Polymorphic bytecode: compositional compilation for Java-like languages
Proceedings of the 32nd ACM SIGPLAN-SIGACT symposium on Principles of programming languages
Hi-index | 0.00 |
Most mainstream object-oriented languages, like C++, Java and C#, are statically typed. In recent years, untyped languages, in particular scripting languages for the web, have gained a lot of popularity notwithstanding the fact that the advantages of static typing, such as earlier detection of errors, are widely accepted. We think that one of the main reasons for their widespread adoption is that, in many situations, the ability of ignoring types can be handy to write simpler and more readable code.We propose an extension of Java-like languages which allows developers to forget about typing in strategic places of their programs without losing type-safety. That is, we allow programmers to write simpler code without sacrificing the advantages of static typing. This is achieved by means of inferred type constraints. These constraints describe the implicit requirements on untyped code to be correctly invoked.This flexibility comes at a cost: field accesses and method invocations on objects of unknown types are less efficient than regular field accesses and method invocations. Also, our type system is currently more restrictive than it should be; its extension is the subject of ongoing work. However, the novel approach presented here is quite interesting on its own, as it supports separate compilation and there is zero runtime overhead on code which does not take advantage of the new features.