Conference paper Open Access

A Scheme Foreign Function Interface to JavaScript Based on an Infix Extension

Bélanger, Marc-André; Feeley, Marc

This paper presents a JavaScript Foreign Function Interface for a Scheme implementation hosted on JavaScript and supporting threads. In order to be as convenient as possible the foreign code is expressed using infix syntax, the type conversions between Scheme and JavaScript are mostly implicit, and calls can both be done from Scheme to JavaScript and the other way around. Our approach takes advantage of JavaScript’s dynamic nature and its support for asynchronous functions. This allows concurrent activities to be expressed in a direct style in Scheme using threads. The paper goes over the design and implementation of our approach in the Gambit Scheme system. Examples are given to illustrate its use.

Files (539.0 kB)
Name Size
539.0 kB Download
All versions This version
Views 179179
Downloads 145145
Data volume 78.1 MB78.1 MB
Unique views 164164
Unique downloads 127127


Cite as