Skip to main content

Programming language integration and migration

Laurence Tratt ( King's College London )

Programming languages are islands, each disconnected from the rest. We choose a language for a task and, for better or worse, stick with it. Communicating between programs written in different languages is such a slow, arduous, task that we avoid doing it whenever possible.
In this talk I will show how language composition can lower, and even remove, the barriers between languages, using compositions of Python and Prolog, and Python and PHP as concrete examples. We have pioneered new approaches to the two major challenges in language composition: editing and running composed programs.
Using our novel editor 'Eco', users can write source files with mixed languages. For example, PHP source files can contain Python functions wherever PHP functions are valid. In other words, users can mix the two languages even within a single file. The two languages can be intertwined in surprising ways. For example, variable scopes are defined across the languages.
We then run programs upon a composed meta-tracing VM. Our preliminary results suggest that the performance of composed programs is often competitive with high performing mono-language VMs and outperforms.
I will conclude by examining the possible uses of a PHP and Python composition. For example, some may use it to gradually migrate a system from PHP to Python (or vice versa), while others may use it to take advantage of the different libraries available in each language.
Joint work with Edd Barrett, Carl Friedrich Bolz, and Lukas Diekmann. More at

Share this: