Integrating typed and untyped code in a scripting language

  • Authors:
  • Tobias Wrigstad;Francesco Zappa Nardelli;Sylvain Lebresne;Johan Östlund;Jan Vitek

  • Affiliations:
  • Stockholm University, Kista, Sweden;INRIA, Le Chesnay, France;Purdue University, West Lafayette, USA;Purdue University, West Lafayette, USA;Purdue University, West Lafayette, USA

  • Venue:
  • Proceedings of the 37th annual ACM SIGPLAN-SIGACT symposium on Principles of programming languages
  • Year:
  • 2010

Quantified Score

Hi-index 0.00

Visualization

Abstract

Many large software systems originate from untyped scripting language code. While good for initial development, the lack of static type annotations can impact code-quality and performance in the long run. We present an approach for integrating untyped code and typed code in the same system to allow an initial prototype to smoothly evolve into an efficient and robust program. We introduce like types , a novel intermediate point between dynamic and static typing. Occurrences of like types variables are checked statically within their scope but, as they may be bound to dynamic values, their usage is checked dynamically. Thus like types provide some of the benefits of static typing without decreasing the expressiveness of the language. We provide a formal account of like types in a core object calculus and evaluate their applicability in the context of a new scripting language.