We want better programming languages, but “better” invariably ends up becoming “bigger”. Since we can’t keep making our languages bigger, what alternatives do we have? I propose language composition as a possible solution to this long standing problem. Language composition means merging two languages and allowing them to be used together. At its most fine-grained, this could allow multiple programming languages to be used together within a single source file. However, language composition is not a new idea. It has failed in the past because editing composed programs was intolerably difficult and the resulting programs ran too slow to be usable. Without good solutions to these problems, language composition will remain an unrealised ideal. I will show how the work we are doing is beginning to address both aspects. We have built a prototype editor utilising a novel concept ‘language boxes’, which allows one to edit composed programs in a natural way. We are tackling the performance problem by composing together interpreters using meta-tracing, allowing us to build composed VMs with custom JITs that naturally optimise across different language’s run-times. While we are much nearer the beginning of the journey than the end, our initial research has allowed us to build a simple composition of two very different languages: Python and Prolog.
I am a Lecturer in the Department of Informatics at King’s College London where I lead the Software Development Team. Previously I was a Senior Lecturer at Middlesex University and before that a Senior Lecturer at Bournemouth University. I was an Associate Editor in Chief of IEEE Software (2008-2012) and currently sit on the Editorial Board of The Journal of Object Technology.
Research Interests: my main research interests surround programming languages and domain specific languages. One of my major contributions has been through the Converge programming language which allows syntactically distinct domain specific languages to be embedded in normal program files and compiled out at compile-time. My publications are available separately as is a larger list of the software I have written.