Static interpretation of modules
Proceedings of the fourth ACM SIGPLAN international conference on Functional programming
Science of Computer Programming - Special issue on mathematics of program construction
Web Programming with SMLserver
PADL '03 Proceedings of the 5th International Symposium on Practical Aspects of Declarative Languages
Rabbit: A Compiler for Scheme
The standard ML basis library
O'browser: objective caml on browsers
Proceedings of the 2008 ACM SIGPLAN workshop on ML
Flapjax: a programming language for Ajax applications
Proceedings of the 24th ACM SIGPLAN conference on Object oriented programming systems languages and applications
Links: web programming without tiers
FMCO'06 Proceedings of the 5th international conference on Formal methods for components and objects
Type-safe distributed programming with ML5
TGC'07 Proceedings of the 3rd conference on Trustworthy global computing
Hi-index | 0.00 |
Standard ML is a strictly typed functional programming language that provides programmers with many powerful features, including parametric polymorphism, pattern matching, and a rich module system. In this paper, we present SMLtoJs, an optimizing compiler that compiles Standard ML programs into JavaScript to be executed in any JavaScript-supported Web browser. SMLtoJs supports all of Standard ML and most of the Standard ML Basis Library, which allows for the SMLtoJs compiler itself to be compiled and executed in a browser. We present the overall structure of SMLtoJs, including the non-JavaScript aware front-end and the JavaScript-specific backend. We also present SMLtoJs's type safe interface for interacting with native JavaScript, such as the DOM api. Finally, we present the details of the JavaScript-specific optimizations, including how SMLtoJs deals with tail recursion, which enable complex Standard ML programs to be compiled into efficient JavaScript.