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
els2021_belm_mfeeley_final.pdf
md5:1ca8c5a02ed44d09e38bd69557af42e0
539.0 kB Download
90
68
views
downloads
All versions This version
Views 9090
Downloads 6868
Data volume 36.6 MB36.6 MB
Unique views 8383
Unique downloads 5858

Share

Cite as