Towards polyglot adapters for the GraalVM
Today, there are many different programming languages and even more software libraries and frameworks for various use cases. Polyglot runtime environments such as GraalVM allow developers to build and extend applications using multiple languages, which gives them a much broader choice in terms of frameworks and libraries available for reuse. Nonetheless, some usability problems remain, for example with regard to passing data from one language to another. GraalVM provides language interoperability through its polyglot API and allows objects and messages to be passed across languages. From a developer perspective, however, it is sometimes unclear how to pass non primitive objects from one language into a library or framework written in another language. Code from that other language may expect these objects to respond to a different set of messages, which they may not understand at all. In this paper, we present polyglot adapters, an early stage concept that helps to pass objects across different languages. We explain how these adapters can improve the polyglot programming experience and demonstrate this with a prototype for the GraalVM.
Programming