On the integration of Smalltalk and Java: practical experience with STX:LIBJAVA
暂无分享,去创建一个
After decades of development in programming languages and programming environments, Smalltalk is still one of few environments that provide advanced features and is still widely used in the industry. However, as Java became prevalent, the ability to call Java code from Smalltalk and vice versa becomes important. Traditional approaches to integrate the Java and Smalltalk languages are through low-level communication between separate Java and Smalltalk virtual machines. We are not aware of any attempt to execute and integrate the Java language directly in the Smalltalk environment. A direct integration allows for very tight and almost seamless integration of the languages and their objects within a single environment. Yet integration and language interoperability impose challenging issues related to method naming conventions, method overloading, exception handling and thread-locking mechanisms.
In this paper we describe ways to overcome these challenges and to integrate Java into the Smalltalk environment. Using techniques described in this paper, the programmer can call Java code from Smalltalk using standard Smalltalk idioms while the semantics of each language remains preserved. We present STX:LIBJAVA --- an implementation of Java virtual machine within Smalltalk/X --- as a validation of our approach.
[1] Jan Kurs,et al. Efficient Method Lookup Customization for Smalltalk , 2012, TOOLS.
[2] Mike Potel,et al. MVP: Model-View-Presenter The Taligent Programming Model for C++ and Java , 1996 .
[3] Coen De Roover,et al. Language-shifting objects from Java to Smalltalk: an exploration using JavaConnect , 2009, IWST.
[4] Guy L. Steele,et al. Java(TM) Language Specification, The (3rd Edition) (Java (Addison-Wesley)) , 2005 .
[5] Michał 'MiMaS' Świątkiewicz. the joy of Smalltalk , 2004 .