Hacker News new | ask | show | jobs
by pavelbr 2989 days ago
What dynamic languages run on the jvm? To my knowledge it doesn't support dynamic types at all.
2 comments

Clojure, Groovy, JRuby, Jython are popular dynamic languages on the JVM, there are others:

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.

You missed the most relevant one that even comes bundled with the JDK, JavaScript.
> 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.

My impression was that Clojure's popularity was comparable to Kotlin and Scala's. Is that not the case?
I 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.
Rhino (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.