Hacker News new | ask | show | jobs
by pron 2384 days ago
As I said, I work on OpenJDK, and the JVM constitutes less than 25% of the Java platform software (JDK). The Java language constitutes about 2% of the codebase, and Kotlin and Clojure make use of over 95% of it. They use the JVM, the Java core libraries (thanks to erased generics), and the selection of Java's debugging, profiling and monitoring tools that make up the JDK (not to mention their extensive use of third-party Java ecosystem libraries that aren't a part of the core platform). They are most definitely Java platform languages (although they're not only Java platform languages; e.g. Kotlin is also an Android language), even if colloquially many refer to the platform as "the JVM" although the JVM is only a small, yet obviously very important, part of it. Java is the name of both a programming language and the platform it is part of, and sometimes, for the sake of brevity, I too would refer to the platform as "the JVM." But as someone working on Java (not so much the language, but the platform), I try to use the more precise, more correct terminology, and I guess I'll just have to try and live with your dismay.
1 comments

I can't believe you work on the OpenJDK and are trying to intentionally confuse the JVM and Java.

tsk tsk.

Well then, I guess I'm going to have to learn to live with your disbelief as well.

Java is the name of both a software platform as well as a programming language for that platform. Languages that target that platform are often called "JVM languages," but really they make use of almost all of Java (the platform) rather than just the JVM (although that degree varies: Kotlin makes use of the platform almost as much as the Java language; Clojure makes use of somewhat less, yet more than Scala or Ceylon).

http://openjdk.java.net/

https://docs.oracle.com/en/java/javase/13/docs/specs/index.h...

https://en.wikipedia.org/wiki/Java_(software_platform)

You're mangling the conversation and then trying to force an issue with the conversation you mangled... again.

Please show me where Github, Tiboe, or any other survey says "Java" instead of "Clojure" or any "JVM language".

That's what my comment was referring to (rather, a small part of it was and you latched onto the chance to derail the conversation to wax poetic about semantics again)

You're the only one trying to talk about a platform.

Github indexes a ".java" file with Java code as a Java language file and a ".clj" file with Clojure code as a Clojure language file.

Not a "java platform file".

Java is the name of a language as well as the name of a platform that contains it, in addition to a VM, core libraries and a wide selection of tools, all as integrated but distinct components (those living in Britain will find such dual meanings familiar, even though they recognize they might be confusing to outsiders). You yourself have talked about "under the hood improvements" to C#, meaning the .NET platform, not just the C# language. The discussion of reified generics applies to the platform, not the language -- indeed, reification has hurt interop on .NET precisely because it occurs in the runtime (VM and standard libraries) rather than just the language -- and this very article about project Valhalla applies to both. Being languages that target Java (the platform), Kotlin and Scala would benefit from Valhalla just as much as the Java language. They would benefit not only from the changes to the JVM, but also from the relevant changes to the other parts of the Java platform that they rely on, like the core libraries and serviceability tools.

Now, I don't mind at all you calling the Java platform "the JVM," as many do, but using the more accurate terminology does not distract from the discussion, even though the terminology in itself is not very important. It serves to highlight Java's design and strategy from its inception, as you can see in the video I linked to: the intention and strategy all along have been to have a platform made of integrated but distinct components, with a state-of-the-art VM and a conservative language. To this day, the Java VM is state-of-the-art while the Java language is intentionally conservative. .NET's design philosophy and strategy are just different, also intentionally so. To ignore all that is to ignore how Java's designers see it and maintain it, and misses the point of what Java is. It also misses the central elements of Java's strategy, which has made it so successful.

How you managed to get from my original point to this rambling screed is masterful, I'll give you that much!
Your original point was something about how you don't like Java's erased generics (and general language evolution). I explained how they fit in with, and, indeed, the best choice for Java's design philosophy that, despite being drastically different from .NET's has proven exceptionally successful -- namely one based on a platform made of several integrated but very much distinct components, with a fast-innovating state-of-the-art VM and a slow-innovating conservative language. I think it was rather straightforward but if you've found it masterful ¯\_(ツ)_/¯