Supporting Dynamic and Static Typing by means of Union and Intersection Types
Autor(es) y otros:
Fecha de publicación:
Editorial:
IEEE
Versión del editor:
Descripción física:
Resumen:
Although static typing provides early type error detection, better legibility and abstraction, and more opportunities for compiler optimizations, dynamic typing supplies a high degree of runtime adaptiveness, providing an agile and interactive development suitable for rapid prototyping. In this article, the minimal core type system of a programming language which main aim is to provide the benefits of both dynamic and static typing is presented. Keeping explicit typing, implicit type inference is introduced to combine dynamic and static typing in the same programming language. Union and intersection types are customized to express the dynamism of implicitly typed references. The main benefits of our work are an early type error detection in dynamic code, the integration of dynamic and static code in the same programming language, and a notable optimization of the generated code.
Although static typing provides early type error detection, better legibility and abstraction, and more opportunities for compiler optimizations, dynamic typing supplies a high degree of runtime adaptiveness, providing an agile and interactive development suitable for rapid prototyping. In this article, the minimal core type system of a programming language which main aim is to provide the benefits of both dynamic and static typing is presented. Keeping explicit typing, implicit type inference is introduced to combine dynamic and static typing in the same programming language. Union and intersection types are customized to express the dynamism of implicitly typed references. The main benefits of our work are an early type error detection in dynamic code, the integration of dynamic and static code in the same programming language, and a notable optimization of the generated code.