کد مقاله کد نشریه سال انتشار مقاله انگلیسی نسخه تمام متن
418066 681609 2011 19 صفحه PDF دانلود رایگان
عنوان انگلیسی مقاله ISI
Reconciling method overloading and dynamically typed scripting languages
موضوعات مرتبط
مهندسی و علوم پایه مهندسی کامپیوتر نظریه محاسباتی و ریاضیات
پیش نمایش صفحه اول مقاله
Reconciling method overloading and dynamically typed scripting languages
چکیده انگلیسی

The Java virtual machine (JVM) has been adopted as the executing platform by a large number of dynamically typed programming languages. For example, Scheme, Ruby, Javascript, Lisp, and Basic have been successfully implemented on the JVM and each is supported by a large community. Interoperability with Java is one important requirement shared by all these languages.We claim that the lack of type annotation in interpreted dynamic languages makes this interoperability either flawed or incomplete in the presence of method overloading. We studied 17 popular dynamically typed languages for JVM and .Net, none of them were able to properly handle the complexity of method overloading.We present dynamic type tag, an elegant solution for dynamic language interpreters to properly interact with Java objects in the presence of overloaded methods. The idea is to embody a type annotation in a Java object reference. Java references may be annotated in order to properly determine the signature of methods to invoke. We demonstrate its applicability in the JSmall language and provide the pellucid embedding, a formalization of our approach.


► This paper highlights an important deficiency in the common way dynamically typed languages interoperate with Java.
► It presents the pellucid embedding, a simple and generic solution easily embeddable in a language for which a static type system is missing.
► It demonstrates type soundness and highlights type tag propagation along with the control flow.

ناشر
Database: Elsevier - ScienceDirect (ساینس دایرکت)
Journal: Computer Languages, Systems & Structures - Volume 37, Issue 3, July 2011, Pages 132–150
نویسندگان
,