Practical, pluggable types for a dynamic language

被引:8
|
作者
Haldiman, Niklaus [1 ]
Denker, Marcus [1 ]
Nierstrasz, Oscar [1 ]
机构
[1] Univ Bern, IAM, Software Composit Grp, CH-3012 Bern, Switzerland
关键词
Dynamic languages; Type systems; Programming languages; CHECKING;
D O I
10.1016/j.cl.2008.06.003
中图分类号
TP31 [计算机软件];
学科分类号
081202 ; 0835 ;
摘要
Most languages fall into one of two camps: either they adopt a unique, static type system, or they abandon static type-checks for run-time checks. Pluggable types blur this division by (i) making static type systems optional, and (ii) supporting a choice of type systems for reasoning about different kinds of static properties. Dynamic languages can then benefit from static-checking without sacrificing dynamic features or committing to a unique, static type system. But the overhead of adopting pluggable types can be very high, especially if all existing code must be decorated with type annotations before any type-checking can be performed. We propose a practical and pragmatic approach to introduce pluggable type systems to dynamic languages. First of all, only annotated code is type-checked. Second, limited type inference is performed on unannotated code to reduce the number of reported errors. Finally, external annotations can be used to type third-party code. We present TypePlug, a Smalltalk implementation of our framework. and report on experience applying the framework to three different pluggable type systems. (c) 2008 Elsevier Ltd. All rights reserved.
引用
收藏
页码:48 / 62
页数:15
相关论文
共 50 条
  • [21] Practical Language Testing
    Qian, David D.
    Pan, Mingwei
    LANGUAGE ASSESSMENT QUARTERLY, 2011, 8 (03) : 309 - 312
  • [22] Practical Language Lessons
    不详
    EDUCATION, 1903, 24 (02): : 124 - 124
  • [23] Practical Language Testing
    Nuessel, Frank
    MODERN LANGUAGE JOURNAL, 2011, 95 (04): : 686 - 688
  • [24] WHAT IS LANGUAGE OF PRACTICAL
    DANIELS, LB
    CURRICULUM THEORY NETWORK, 1975, 4 (04): : 237 - 261
  • [25] PRACTICAL - LANGUAGE FOR CURRICULUM
    SCHWAB, JJ
    SCHOOL REVIEW, 1969, 78 (01): : 1 - 23
  • [26] Practical Knowledge of Language
    Tsai, Cheng-hung
    PHILOSOPHIA, 2010, 38 (02) : 331 - 341
  • [27] A Simple but Effective Pluggable Entity Lookup Table for Pre-trained Language Models
    Ye, Deming
    Lin, Yankai
    Li, Peng
    Sun, Maosong
    Liu, Zhiyuan
    PROCEEDINGS OF THE 60TH ANNUAL MEETING OF THE ASSOCIATION FOR COMPUTATIONAL LINGUISTICS (ACL 2022): (SHORT PAPERS), VOL 2, 2022, : 523 - 529
  • [28] Practical Inference of Nullability Types
    Karimipour, Nima
    Pham, Justin
    Clapp, Lazaro
    Sridharan, Manu
    ESEC/FSE 2023 - Proceedings of the 31st ACM Joint Meeting European Software Engineering Conference and Symposium on the Foundations of Software Engineering, 2023, : 1395 - 1406
  • [29] Practical Inference of Nullability Types
    Karimipour, Nima
    Pham, Justin
    Clapp, Lazaro
    Sridharan, Manu
    PROCEEDINGS OF THE 31ST ACM JOINT MEETING EUROPEAN SOFTWARE ENGINEERING CONFERENCE AND SYMPOSIUM ON THE FOUNDATIONS OF SOFTWARE ENGINEERING, ESEC/FSE 2023, 2023, : 1395 - 1406
  • [30] Practical Optional Types for Clojure
    Bonnaire-Sergeant, Ambrose
    Davies, Rowan
    Tobin-Hochstadt, Sam
    PROGRAMMING LANGUAGES AND SYSTEMS (ESOP 2016), 2016, 9632 : 68 - 94