Static TypeScript An Implementation of a Static Compiler for the TypeScript Language

被引:10
|
作者
Ball, Thomas [1 ]
de Halleux, Peli [1 ]
Moskal, Michal [1 ]
机构
[1] Microsoft Res, Redmond, WA 98052 USA
来源
PROCEEDINGS OF THE 16TH ACM SIGPLAN INTERNATIONAL CONFERENCE ON MANAGED PROGRAMMING LANGUAGES AND RUNTIMES (MPLR '19) | 2019年
关键词
!text type='Java']Java[!/text]Script; TypeScript; compiler; interpreter; microcontrollers; virtual machine;
D O I
10.1145/3357390.3361032
中图分类号
TP31 [计算机软件];
学科分类号
081202 ; 0835 ;
摘要
While the programming of microcontroller-based embeddable devices typically is the realm of the C language, such devices are now finding their way into the classroom for CS education, even at the level of middle school. As a result, the use of scripting languages (such as JavaScript and Python) for microcontrollers is on the rise. We present Static TypeScript (STS), a subset of TypeScript (itself, a gradually typed superset of JavaScript), and its compiler/linker toolchain, which is implemented fully in TypeScript and runs in the web browser. STS is designed to be useful in practice (especially in education), while being amenable to static compilation targeting small devices. A user's STS program is compiled to machine code in the browser and linked against a precompiled C++ runtime, producing an executable that is more efficient than the prevalent embedded interpreter approach, extending battery life and making it possible to run on devices with as little as 16 kB of RAM (such as the BBC micro:bit). This paper is primarily a description of the STS system and the technical challenges of implementing embedded programming platforms in the classroom.
引用
收藏
页码:105 / 116
页数:12
相关论文
共 50 条
  • [1] Language as calculation in Big Typescript
    Engelmann, Mauro
    PHILOSOPHIQUES, 2012, 39 (01): : 35 - 55
  • [2] The StatiC compiler & language
    Gray, P
    DR DOBBS JOURNAL, 2005, 30 (03): : 58 - +
  • [3] An empirical study on bugs in TypeScript programming language
    Wang, Ziyuan
    Fang, Yun
    Wang, Nannan
    JOURNAL OF SYSTEMS AND SOFTWARE, 2025, 226
  • [4] Understanding TypeScript
    Bierman, Gavin
    Abadi, Martin
    Torgersen, Mads
    ECOOP 2014 - OBJECT-ORIENTED PROGRAMMING, 2014, 8586 : 257 - 281
  • [5] Boris Cherny on TypeScript
    Black, Nate
    IEEE SOFTWARE, 2020, 37 (02) : 98 - 100
  • [6] THE TYPESCRIPT OF THE 'HEART OF DARKNESS'
    MICHAEL, M
    BERRY, W
    CONRADIANA, 1980, 12 (02) : 147 - 155
  • [7] Refinement Types for TypeScript
    Vekris, Panagiotis
    Cosman, Benjamin
    Jhala, Ranjit
    ACM SIGPLAN NOTICES, 2016, 51 (06) : 310 - 325
  • [8] PHILOSOPHY IN THE BIG TYPESCRIPT
    LUCKHARDT, CG
    SYNTHESE, 1991, 87 (02) : 255 - 272
  • [9] TYPESCRIPT OF CONRAD 'ALMAYERS FOLLY'
    EDDLEMAN, FE
    HIGDON, DL
    TEXAS STUDIES IN LITERATURE AND LANGUAGE, 1976, 18 (01) : 98 - 123
  • [10] A TYPESCRIPT ETHNIC JOKE ANTHOLOGY
    PRESTON, MJ
    NEW YORK FOLKLORE, 1975, 1 (3-4): : 229 - 234