java - Equivalent of the DLR for the JVM? -


What is the DLR (.NET for dynamic language runtime) on GVM? I know that I can go about my dynamic binding and can emit my own bytecode with Java. But is there a pre-built structure (such as DLR) then I do not have to invent the wheel again? DLR is a number of different things, some of which have a direct equivalent in Java, some of which are separate, Are present in different forms and some of them are not equal. Some of those that do are already part of the platform, some will be part of Java 7 and will be available from some third parties.

Runtime Binder and Caching Infrastructure

DLR has a runtime binding and caching infrastructure that makes dynamic dispatch fast and efficient as a dynamic dispatch in the form of stationary dispatch. Fast and C ++ - For faster than how to style faster than virtual table remittances, it is known for more than 20 years, but most of the dynamic performance engines are those technologies Not like Polimorfik inline caching, dynamic type of extraction, reaction optimization type and so on. DLR tries to provide a single implementation, which can be shared by all DLR-based languages ​​(the C # runtime binders are used for the dynamic keyword in the # code).

Java equivalent, which extends JVM with runtime binding and caching infrastructure. The main difference between DLR and JSR-292 is that JSR-292 has been implemented at VM level, which means that you need a new VM to use it. JSR-292 is going to be a part of the next JVM specification, which in turn is going to be part of the Java 7 platform specification, but it is still one year or more. (It is already available in the current release, though, and has been for some time.)

DLR, OTOH is the only library, and you can install it on CLR 2.0, if You want me to serve In fact, you do not even need CLR, any will do CLI-compliant VES, like Novell's and since the DLR is open source, Novell can simply download the source code from the Microsoft website, and It can be sent as a part of the mono without writing a code ... which is exactly what they are doing. The implementation of the Sun of JSR-292 is also open source, but it does not help IBM, Oracle, Apache, Redhat, GNU and similar, because it is very VM-specific, so apply to each JV vendor itself Have to do. (And there are four different JVM in Sun alone )

[Note: There is Is a Remy Fox, which implements JSR-292 via biodegrad reconstruction for the old JVM. It is 100% compatible, but very slow.]

Meta-Object Protocol for Interoperability

DLR has an MOP ( IDynamicObject interface) , Which allows all DLR-based languages ​​to interact with each other and with very strict integration with CLI-based languages ​​at a higher level and going through CTS.

In Java space, is the equivalent of Atilla Szegi (Rhino Javascript Compiler Maintenance for JVM) project, which is inspired by common aliphip MOP. However,

  • did not end,
  • not widely used (so far) and
  • a third-party library, standard platform Not part of

Three of these may have been changed for some time, but at least one of the last one is probably not for Java 7.

Standardized Embedding API

DLR provides a standardized embedding API for DLR-based languages, which allows you to navigate in your application without learning a separate API for each different order. Allows to embed a language runtime. In fact, you know what the runtime is!

Its equivalent is the JSR-223 Java Scripting API which has been part of the Java platform and remains in Java 6. Code rendering and compiler

The code in DLR is a standard representation for code (DLR tree, expression tree) and both an interpreter and a highly customizable compiler for both those trees, Which allows Langge implementers to focus on their language-specific compiler frontend and behind DLL deal with NLR-relative with code generation behind the scenes.

There is no equivalent in Java.

Dynamic capabilities for stable languages ​​

C # 4 and VB Add dynamic typing for easy integration with Net 10 dynamic languages. Although it is technically nothing to do with DLRR, it uses DLRR for some of its functions.

There is no equivalent in Java.


Comments

Popular posts from this blog

sql - dynamically varied number of conditions in the 'where' statement using LINQ -

asp.net mvc - Dynamically Generated Ajax.BeginForm -

Debug on symbian -