Polyglot Programming - Opportunities of Language Implementation Frameworks for Software DevelopersICOOOLPS paper
When building software, developers usually have to choose a programming language for their use case. This decision, however, defines the list of software frameworks and libraries as well as tools and deployment environments that can be used for a given project. Common cross-language integration techniques, such as foreign function interfaces (FFIs), already allow developers to reuse software written in other languages, but are often complicated, inconvenient to use, or incompatible with the tooling.
Moreover, Integrated Development Environments (IDEs) bundle common software development tools and can support multiple programming languages. However, they usually rely on capabilities provided by the underlying language runtime through an appropriate Application Programming Interface (API). Since these runtime APIs do not always support the same set of features, it is hard for IDEs to provide a consistent programming experience. Therefore, whenever developers want to learn or use another language, they also have to learn how to use the corresponding set of tools.
In the last decade, language implementation frameworks have become more and more popular because they allow language creators to implement programming languages in other high-level languages. Instead of having to build, for example, a garbage collector in a low-level language from scratch, these frameworks usually come with reusable components that are commonly needed to build runtime systems. Additionally, they often provide built-in Just-in-time (JIT) compilation facilities which can be used to increase the performance of a language significantly. The RPython framework, for instance, is maintained as part of the PyPy project and allows interpreters to be implemented in a subset of Python while Oracle’s Truffle framework makes high-performance language implementations possible in Java.
As part of our research, we are exploring new opportunities of combining language implementations written in the same framework with the focus on software developers. On the one hand, combining existing implementations of languages is a convenient way to build polyglot runtime environments. With such multi-language runtime systems, developers can reuse libraries and frameworks written in different languages in their applications. Since all supported languages run on the same runtime environment, FFI calls are no longer needed and therefore tools, especially the ones that heavily interact with the runtime such as debuggers, can operate across the different languages.
On the other hand, language implementation frameworks could also provide out-of-the-box tooling in a consistent way if they can support the same runtime capabilities for all languages. This consequently results in a better programming experience. In future work, we also want to find out how existing or new tools can support developers in building novel and polyglot applications.