Eolang–Java Interoperability
Runtime-level interoperability for Eolang programming language
Overview
Research project focused on enabling seamless interoperability between the Eolang programming language and the Java Virtual Machine (JVM) ecosystem. The work involved designing runtime mechanisms for bidirectional communication between Eolang objects and Java classes, implementing dynamic type mapping using reflection, and validating the approach through formal testing and academic publication.
Research Publications
Exploring the Eolang-Java Integration and Interoperability
Abstract
In recent times, the subject of interoperability has become very popular. In large-scale software applications development, it is a common practice to combine multiple languages in solving peculiar problems and developing robust solutions. The ability to combine multiple languages allows an easy migration of an existing project from one language to another or use existing libraries in another language. This makes interoperability a force to be reckoned with when developing new programming languages. The Eolang programming language is a new research and development initiative aimed at achieving true Object-Oriented Programming by having all components of the program as objects. As such, the construct and syntax of Eolang is vastly different from that of Java. This makes integration and interoperability between these two languages a challenging issue related to method/object naming conventions, keywords and operators, etc. In this paper we explore the potential of Eolang interoperability with Java by looking at the interoperability mechanisms of some other languages with Java, describe ways to overcome these challenges with Eolang and develop the solution. Specifically, we focus on the possibility to call Java code from Eolang while the semantics of both languages remain preserved. Our solution allows Java code to be called in Eolang through wrappers that turn Java classes and methods into Eolang Objects.
Context
The Eolang programming language required seamless interoperability with the Java ecosystem to support real-world adoption.
Problem
Lack of native integration limited practical use and hindered integration with existing Java-based systems.
Approach
Designed and implemented runtime-level interoperability using Java reflection to generate dynamic wrappers, enabling Eolang programs to interact directly with Java applications. Supported this work with formal research and documentation.
Outcome
Expanded the language's usability and contributed to published academic work on language design and interoperability.
Challenges
Type System Mismatch
Eolang's object-oriented paradigm differs fundamentally from Java's class-based model. Mapping between type systems required careful design to preserve semantics.
Runtime Performance Overhead
Reflection-based dynamic invocation introduced performance costs that needed to be measured and minimized to ensure practical usability.
Limited Existing Research
Few precedents existed for this specific language pairing, requiring original research into interoperability patterns and validation methodologies.
Solutions
Reflection-Based Dynamic Wrappers
Implemented a wrapper generation system using Java reflection API to dynamically introspect Java classes and generate Eolang-compatible bindings at runtime.
Impact: Enabled Eolang programs to instantiate and invoke Java objects without manual binding code.
Bidirectional Type Mapping
Designed type conversion rules mapping Eolang data structures to Java primitives and objects, with runtime validation to detect incompatible operations.
Impact: Achieved type-safe interoperability between both languages.
Formal Testing and Validation
Created comprehensive test suites covering edge cases, performance benchmarks, and integration scenarios. Documented findings in academic paper format.
Impact: Validated approach rigorously and contributed to published research.