2 ms·
> Especially dynamic languages have been struggling with inefficiencies imposed by some of the Java-orientied paradigms. I don’t think it is anywhere close to
by kaba0 5y ago
> Especially dynamic languages have been struggling with inefficiencies imposed by some of the Java-orientied paradigms.
I don’t think it is anywhere close to the truth. They are very well suited, as the JIT compiler can specialize dynamic types (and optionally deoptimize them when the type changes). There are also clojure, jruby, a python implementation, and java can also be written with significant use of reflection.
And then there is GraalVM built on top of the JVM that has truffleruby, the fastest Ruby implementation, graaljs which has very comparable performance to v8 with comparatively much less man hours , etc, all very dynamic languages.
- lxgr 5y agoWas that true even before `invokedynamic`, which as far as I know was specifically added to make these non-Java languages easier to port and more performant? All of the examples you‘ve mentioned don‘t seem like trivial ports at least from an outsider‘s point of view. The JVM itself has definitely adapted to these use cases, but it wasn‘t designed with them in mind.
- kaba0 5y agoYou are right about the reason invokedynamic was added, but as far as I know the JVM always supported dynamic class loading (and thus class creation as well), so while not necessarily in a too performant manner, it could always be used as a runtime for even very dynamic languages. (And I think I left out Groovy which is a quite old dynamic language on the JVM).