English

Fine-grained Language Composition: A Case Study

Programming Languages 2017-03-02 v3

Abstract

Although run-time language composition is common, it normally takes the form of a crude Foreign Function Interface (FFI). While useful, such compositions tend to be coarse-grained and slow. In this paper we introduce a novel fine-grained syntactic composition of PHP and Python which allows users to embed each language inside the other, including referencing variables across languages. This composition raises novel design and implementation challenges. We show that good solutions can be found to the design challenges; and that the resulting implementation imposes an acceptable performance overhead of, at most, 2.6x.

Keywords

Cite

@article{arxiv.1503.08623,
  title  = {Fine-grained Language Composition: A Case Study},
  author = {Edd Barrett and Carl Friedrich Bolz and Lukas Diekmann and Laurence Tratt},
  journal= {arXiv preprint arXiv:1503.08623},
  year   = {2017}
}

Comments

27 pages, 4 tables, 5 figures

R2 v1 2026-06-22T09:05:28.040Z