Language-Shifting Objects in Inter-language Interoperability

Printer-friendly version

Publication Type:

Conference Paper

Source:

Proceedings of the International Workshop on Smalltalk Technologies (IWST09) (2009)

Keywords:

interconnect, interoperability, java, java smalltalk symbiosis, javaconnect, linguistic symbiosis, smalltalk, symbiosis

Abstract:

<p>Foreign-function interfaces enable programs in a host language to interoperate with programs written in another language and vice-versa. Two languages that feature such an interface to a common language can even interoperate by means of this common intermediate language. Smalltalk and Java, for example, both offer an interface to C and can therefore interoperate through a connection of these interfaces. However, the resulting interactions will need to occur at the level of abstraction offered by the (low-level) C interfaces, although both Java and Smalltalk are object-oriented languages. In this paper, we describe how the dynamic and reflective facilities of the Smalltalk language permit to raise the level of abstraction of these inter-language interactions to seamless message passing between objects. In addition, we introduce and explore the concept of language shifting objects where Java objects are not only represented in Smalltalk but can partially or completely migrate from Java to Smalltalk. Language-shifting effectively migrates Java methods to Smalltalk methods such that original Java objects can end up ``living'' in the Smalltalk environment without needing a connection to their originating Java environment.</p>