3 ms·
The problem with using the JVM is that it has been designed around the Java language. This doesn't make it a great fit for languages that don't use Java's objec
by weavejester 17y ago
The problem with using the JVM is that it has been designed around the Java language. This doesn't make it a great fit for languages that don't use Java's object model, or that require functionality like tail call optimisation. It's possible to work around these problems, but for implementing languages, it's less flexible than something like LLVM
The advantage with using the JVM is that you get a lot of libraries for free, which may be worth coping with a Java-centric design.
- jacquesm 17y agoThere are actually many 'underwater' efforts at making the JVM play nice with other programming languages besides java. For instance, for java 7 there is supposed to be support for dynamic languages.
- donw 17y agoinvokeDynamic is already part of Java7, via OpenJDK, as of M3. You can see the milestone list here: http://openjdk.java.net/projects/jdk7/milestones/ http://openjdk.java.net/projects/jdk7/milestones/ I've been running M4 on a Debian box for awhile now, and it's surprisingly stable for an 'in-development' product.
- jacquesm 17y agoI'll wait for a bit, we're kind of scared of the bleeding edge :) As soon as it hits the mainstream and people have been testing the hell out of it we'll surely follow though. Second best is good enough for production.
- arohner 17y agoInvoke dynamic is a nice start, but it too is geared towards Ruby/Python style dynamism. It does almost nothing for Clojure.
- megaduck 17y agoTrue, but it's hugely significant as a signal that "the JVM isn't just for Java". Languages like Ruby and Python have large mindshare right now, so InvokeDynamic floated to the top. Clojure will have it's turn. Things like tail recursion are already on the radar. Check out the Da Vinci Machine project for details. http://openjdk.java.net/projects/mlvm/subprojects.html http://openjdk.java.net/projects/mlvm/subprojects.html
- cgrand-net 17y agoFor Clojure, invoke-dynamic means faster non-hinted (reflective) calls. And faster multimethods.