ABSTRACT
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.
- Erich Gamma, Richard Helm, Ralph Johnson, and John Vlissides. 1995. Design Patterns: Elements of Reusable Object-oriented Software. Addison-Wesley Longman Publishing Co., Inc., Boston, MA, USA. Google ScholarDigital Library
- Google. 2019. Protocol Buffers. https://github.com/protocolbuffers/protobufGoogle Scholar
- Matthias Grimmer, Chris Seaton, Roland Schatz, Thomas Würthinger, and Hanspeter Mössenböck. 2015. High-performance Cross-language Interoperability in a Multi-language Runtime. In Proceedings of the 11th Symposium on Dynamic Languages (DLS 2015). ACM, New York, NY, USA, 78--90. Google ScholarDigital Library
- Oracle. 2019. GraalVM SDK Java API Reference. https://www.graalvm.org/sdk/javadoc/org/graalvm/polyglot/proxy/package-summary.htmlGoogle Scholar
- Remy Sharp. 2010. What is a Polyfill? https://remysharp.com/2010/10/08/what-is-a-polyfill/Google Scholar
- Thomas Würthinger, Christian Wimmer, Andreas Wöß, Lukas Stadler, Gilles Duboscq, Christian Humer, Gregor Richards, Doug Simon, and Mario Wolczko. 2013. One VM to Rule Them All. In Proceedings of the 2013 ACM International Symposium on New Ideas, New Paradigms, and Reflections on Programming & Software (Onward! 2013). ACM, New York, NY, USA, 187--204. Google ScholarDigital Library
Index Terms
- Towards polyglot adapters for the GraalVM
Recommendations
GraalVM: metaprogramming inside a polyglot system (invited talk)
META 2018: Proceedings of the 3rd ACM SIGPLAN International Workshop on Meta-Programming Techniques and ReflectionGraalVM is a polyglot virtual machine for running applications written in a variety of languages such as JavaScript, Ruby, Python, R, JVM-based languages like Java, Scala, Kotlin, and LLVM-based languages such as C and C++.
GraalVM enables ...
GraalSqueak: toward a smalltalk-based tooling platform for polyglot programming
MPLR 2019: Proceedings of the 16th ACM SIGPLAN International Conference on Managed Programming Languages and RuntimesPolyglot programming provides software developers with a broader choice in terms of software libraries and frameworks available for building applications. Previous research and engineering activities have focused on language interoperability and the ...
User-defined interface mappings for the GraalVM
Programming '20: Companion Proceedings of the 4th International Conference on Art, Science, and Engineering of ProgrammingTo improve programming productivity, the right tools are crucial. This starts with the choice of the programming language, which often predetermines the libraries and frameworks one can use. Polyglot runtime environments, such as GraalVM, provide ...
Comments