Static typing & JavaScript libraries: towards a more considerate relationship

  • Authors:
  • Benjamin Canou;Emmanuel Chailloux;Vincent Botbol

  • Affiliations:
  • Université Pierre et Marie Curie, Paris, France;UPMC, Paris, France;UPMC, Paris, France

  • Venue:
  • Proceedings of the 22nd international conference on World Wide Web companion
  • Year:
  • 2013

Quantified Score

Hi-index 0.00

Visualization

Abstract

In this paper, after relating a short history of the mostly unhappy relationship between static typing and JavaScript (JS), we explain a new attempt at conciliating them which is more respectful of both worlds than other approaches. As an example, we present Onyo, an advanced binding of the Enyo JS library for the OCaml language. Onyo exploits the expressiveness of OCaml's type system to properly encode the structure of the library, preserving its design while statically checking that it is used correctly, and without introducing runtime overhead.