Integrating typed and untyped code in a scripting language

Integrating typed and untyped code in a scripting language
复制标题

在脚本语言中集成类型化和非类型化代码

DOI:
10.1145/1706299.1706343
复制
发表时间:
2010
影响因子:
--
通讯作者:
J. Vitek
J. Vitek
中科院分区:
--
文献类型:
--
作者:
Tobias Wrigstad;Francesco Zappa Nardelli;Sylvain Lebresne;Johan Östlund;J. Vitek

文献摘要

被引文献

相似文献

许多大型软件系统源自未经类似的脚本语言代码。虽然对初始开发有益,但缺乏静态类型的注释可能会影响代码质量和性能。我们提出了一种在同一系统中集成未构图的代码和键入代码的方法,以使初始原型顺畅地演变为有效且健壮的程序。我们引入类型,这是动态和静态键入之间的新型中间点。类型变量的出现在其范围内静态检查,但是,由于它们可能与动态值绑定,因此会动态检查其用法。因此,类型提供了静态打字的一些好处,而不会降低语言的表现力。我们在核心对象计算中提供类型的正式帐户,并在新的脚本语言的背景下评估其适用性。
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.