Integrating Typed and Untyped Code in a Scripting Language

被引:39
作者
Wrigstad, Tobias [1 ]
Nardelli, Francesco Zappa
Lebresne, Sylvain [1 ]
Oestlund, Johan [1 ]
Vitek, Jan [1 ]
机构
[1] Purdue Univ, W Lafayette, IN 47907 USA
来源
POPL'10: PROCEEDINGS OF THE 37TH ANNUAL ACM SIGPLAN-SIGACT SYMPOSIUM ON PRINCIPLES OF PROGRAMMING LANGUAGES | 2010年
关键词
Compilers; Object-orientation; Semantics; Types;
D O I
10.1145/1706299.1706343
中图分类号
TP31 [计算机软件];
学科分类号
081202 ; 0835 ;
摘要
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.
引用
收藏
页码:377 / 388
页数:12
相关论文
共 36 条
  • [1] *AD SYST INC, 2008, ACTIONSCRIPT 3 0 LAN
  • [2] AHMED A, 2009, SCRIPT PROGRAM EVOLU
  • [3] ANCONA D, 2007, IT C THEOR COMP SCI
  • [4] Anderson C., 2003, ELECT NOTES THEORETI, V82
  • [5] [Anonymous], The Computer Language Benchmarks Game
  • [6] AYCOCK J, 2000, INT PYTH C
  • [7] Beck Kent., 1997, Smalltalk Best Practice Patterns
  • [8] BLOOM B, 2009, C OBJ OR PROGR SYST
  • [9] Bracha G., 2004, OOPSLA 04 WORKSH REV
  • [10] BRACHA G, 1993, C OBJ OR PROGR SYST