5 ms·
I hear is pretty bad performance wise compared to the JVM for dynamic languages.
by Scarbutt 9y ago
I hear is pretty bad performance wise compared to the JVM for dynamic languages.
- pavelbr 9y agoWhat dynamic languages run on the jvm? To my knowledge it doesn't support dynamic types at all.
- mythz 9y agoClojure, Groovy, JRuby, Jython are popular dynamic languages on the JVM, there are others: https://en.wikipedia.org/wiki/List_of_JVM_languages https://en.wikipedia.org/wiki/List_of_JVM_languages > To my knowledge it doesn't support dynamic types at all. Not sure where you've got that from or what that's supposed to mean.
- pjmlp 9y agoYou missed the most relevant one that even comes bundled with the JDK, JavaScript.
- vorg 9y ago> Clojure, Groovy, JRuby, Jython are popular dynamic languages on the JVM, there are others Perhaps he meant no dynamic languages have become popular enough on the JVM that it becomes common knowledge that the JVM can support popular types. None of those 4 languages you mentioned (Clojure, Apache Groovy, JRuby, Jython) are popular, whereas alternative JVM languages built from the ground up as static languages (i.e. Kotlin and Scala) are the ones people are adopting.
- omaranto 9y agoMy impression was that Clojure's popularity was comparable to Kotlin and Scala's. Is that not the case?
- vorg 9y agoI like programming in Clojure -- it's the language that introduced me to lisp syntax and immutable values. But Scala has been adopted and Kotlin is being adopted to a far greater degree than Clojure seems to have been.
- PeCaN 9y agoRhino (JavaScript on the JVM, originally written by Mozilla) dates back to 1997 and JRuby to 2001. Suffice it to say, dynamic languages have ran on the JVM for 20 years. Reflection used to be used to implement dynamic types, but since Java 7 (2011) there's been a JVM instruction, invokedynamic, to explicit support dynamic types.
- pjmlp 9y agoNeither the JVM nor the CLR were originally designed with dynamic languages in mind. Thanks to the efforts of IronPython's creator, which eventually joined Microsoft for a while, the Dynamic Language Runtime (DLR) was created. Eventually the JVM followed suit by investing into the infrastructure that eventually became known as invokedynamic. Where most JVMs JIT compilers still beat .NET JIT compilers is that they explore more re-optimizations, while .NET JITs tend to only optimize once, but there are plans to at least improve this on RyuJIT.