Using path-dependent types to build type safe javascript foreign function interfaces

被引:0
|
作者
Richard-Foy, Julien [1 ]
Barais, Olivier [1 ]
Jézéquel, Jean-Marc [1 ]
机构
[1] IRISA, Université de Rennes, France
关键词
Browser API - Dependent types - Expressive power - Foreign function interface - Static type systems - Static typing - Type safety - WEB application;
D O I
暂无
中图分类号
学科分类号
摘要
The popularity of statically typed programming languages compiling to JavaScript shows that there exists a fringe of the programmer population interested in leveraging the benefits of static typing to write Web applications. To be of any use, these languages need to statically expose the Web browser dynamically typed native API, which seems to be a contradiction in terms. Indeed, we observe that existing statically typed languages compiling to JavaScript expose the browser API in ways that either are not type safe, or when they are, typically over constrain the programmers. This article presents new ways to encode the challenging parts of theWeb browser API in static type systems such that both type safety and expressive power are preserved. Our first encoding relies on type parameters and can be implemented in most mainstream languages but drags phantom types up to the usage sites. The second encoding does not suffer from this inconvenience but requires the support of dependent types in the language. © Springer International Publishing Switzerland 2014.
引用
收藏
页码:308 / 321
相关论文
共 48 条
  • [1] Using path-dependent types to build type safe javascript foreign function interfaces
    Richard-Foy, Julien
    Barais, Olivier
    Jézéquel, Jean-Marc
    Lecture Notes in Computer Science (including subseries Lecture Notes in Artificial Intelligence and Lecture Notes in Bioinformatics), 2014, 8541 : 308 - 321
  • [3] Using Path-Dependent Types to Build Type Safe Java']JavaScript Foreign Function Interfaces
    Richard-Foy, Julien
    Barais, Olivier
    Jezequel, Jean-Marc
    WEB ENGINEERING, ICWE 2014, 2014, 8541 : 308 - 321
  • [4] Foundations of Path-Dependent Types
    Amin, Nada
    Rompf, Tiark
    Odersky, Martin
    ACM SIGPLAN NOTICES, 2014, 49 (10) : 233 - 249
  • [5] A Path to DOT: Formalizing Fully Path-Dependent Types
    Rapoport, Marianna
    Lhotak, Ondrej
    PROCEEDINGS OF THE ACM ON PROGRAMMING LANGUAGES-PACMPL, 2019, 3 (OOPSLA):
  • [6] SOME FORMULAE FOR A NEW TYPE OF PATH-DEPENDENT OPTION
    Akahori, Jiro
    ANNALS OF APPLIED PROBABILITY, 1995, 5 (02): : 383 - 388
  • [7] On a generalization of the Gerber-Shiu function to path-dependent penalties
    Biffis, Enrico
    Morales, Manuel
    INSURANCE MATHEMATICS & ECONOMICS, 2010, 46 (01): : 92 - 97
  • [8] Path-dependent high cycle fatigue modeling of joint interfaces in structural concrete
    Maekawa, Koichi
    Fukuura, Naoyuki
    Soltani, Masoud
    JOURNAL OF ADVANCED CONCRETE TECHNOLOGY, 2008, 6 (01) : 227 - 242
  • [9] Foreign market selection of online retailers - A path-dependent perspective on influence factors
    Schu, Matthias
    Morschett, Dirk
    INTERNATIONAL BUSINESS REVIEW, 2017, 26 (04) : 710 - 723
  • [10] Gateaux type path-dependent PDEs and BSDEs with Gaussian forward processes
    Barrasso, Adrien
    Russo, Francesco
    STOCHASTICS AND DYNAMICS, 2022, 22 (01)