Live data from Hacker News

Revisiting Java in 2021 – Part II

avanwyk.com

51–60 of 146 posts

Re: Revisiting Java in 2021 – Part II

#51

I think when Project Loom comes out that Kotlin on top of the JVM will be a tough combo to beat. Kotlin is basically the language Java should be after 20 years of lessons learned, e.g. language-supported Optionals. The JVM is a battle tested platform. Once Project Loom comes out, you'll get the "best of both worlds" - the easier (i.e. "no functions 'colors'") programming model of multiple threads like in Java, but th…

I think for Kotlin that ship has sailed with the introduction of suspend functions.

Re: Revisiting Java in 2021 – Part II

#52
post #26

Changing companies led me from C# to Java. I feel so much less productive in Java, so much extra boilerplate everywhere. C# is just as mainstream as Java, so learning curves and nicheness arguments don't apply, it's just better. I wonder if MSFT will ever make C# run on JVM.

Only if they want to cripple C#, as the JVM isn't able to support all the C++ like features from C#.

Re: Revisiting Java in 2021 – Part II

#53

The comments about Scala resonated. I've been working in a a large Scala codebase for the past few months. I've become a partial fan of the language, however: there have been multiple conversations like : (in screen share with colleague) "See that double right arrow there? What's that mean? (after attempts to find answer in books, SO, etc, and trying to guess based on the three/four other uses the language makes of d…

If you can't use an IDE to jump to the definition (or list all possible definitions) of a function, then aren't you missing one of the main benefits of a statically-typed language? If you can't use the static types for static analysis, what's the point?

You can indeed jump to the method definition in IDEA, although getting the IDE to a good point of dealing with implicits, typeclasses, and their ilk has been a long road.

Re: Revisiting Java in 2021 – Part II

#54
One point that the author fails to mention regarding Jetbrains is that they developed Kotlin and that Intellij at this point is largely implemented in it. Their whole strategy features a lot of Kotlin at this point. So, the best IDE for Java is built by the company that develops a drop in replacement for it. Not a minor point to make. The IDE that Oracle acquired along with Sun (Netbeans) is still there of course but it's rare that I meet someone who even knows what that is.

This is actually also a weakness because there is no good competition in terms of alternative Kotlin IDEs. Eclipse and VS Code have Kotlin plugins but they are nowhere near as good as their Java support. Nice in a pinch if you really can't be bothered to install Intellij.

Java undeniably has great alternative IDEs. I think it's still unrivaled in the wide variety of very decent IDEs and by pretty much every other language. And that has been the case for a long time. Eclipse and Netbeans are still around and both still do a fine job. If you use emacs or vi, there are decent plugins for those as well. VS Code of course has pretty decent support. Kotlin support for all of those is not at the same level.

But one positive thing that has come out of Kotlin (and Scala) keeping the pressure on Oracle is that they have rapidly rolled out a lot of new Java and JVM features in the last few years. JDK 17 is a nice piece of technology with lots of under the hood changes that benefit all JVM languages. So is Graal. I think the efforts to make Java more usable are also going to be nice for people with Java code bases.

Like the author though, Kotlin is my main language at this point.

Re: Revisiting Java in 2021 – Part II

#55
post #7

I use Java every day, but we're stuck with Java 8 because of the confusing and frankly scary licensing around later JDKs. I would love to move to 17 but I need something to show to the C-levels that gives them warm and fuzzies around the license. Does such a thing exist? EDIT: I find it quite depressing that so many want to attack people for being confused around Java licensing. I submit that it is confusing on its f…

I just don't buy this at all. Unless you're talking about a seed-round startup, where the C-levels are all 20-something year old frat bros straight out of college. No remotely competent CTO or CIO in any halfway respectable enterprise is still going to be confused about Java licensing in 2021. The only people I EVER encounter with any confusion around Java licensing are students, entry-level devs, and people from oth…

Hmm. Without Corretto, which is "recent", I don't see how your argument holds. "No" seed stage company is going to use something from Azul, and probably not from "regular" IBM either (that is, exempting RedHat).

Without Corretto, I think Oracle really has poisoned the well.

[1] https://aws.amazon.com/corretto/

Re: Revisiting Java in 2021 – Part II

#56

Earlier quoted context omitted.

I just don't buy this at all. Unless you're talking about a seed-round startup, where the C-levels are all 20-something year old frat bros straight out of college. No remotely competent CTO or CIO in any halfway respectable enterprise is still going to be confused about Java licensing in 2021. The only people I EVER encounter with any confusion around Java licensing are students, entry-level devs, and people from oth…

Ignoring the ad hominem attacks, I appreciate your attempt to clarify the situation. However, you are factually wrong about Oracle's position, because they actually offer two different builds of Java - one that is GPL'd (with classpath exception) and one that is commercial[1]. I take the first claim seriously because it's downloadable as a tar.gz file without any license acceptance. However "GPL" is another thing tha…

> A superficial reading might be that Oracle's JDK does not come with the GPL encumbrance.

This is the whole point of the "classpath exception". You can run, build and distribute Java programs under any license you choose.

> But this also raises the question: what differs between the various JDK builds?

Very little typically. Some like RedHat or Amazon enable extra options, like the Shenandoah GC. The big difference is who you contact for support.

> what is the legal status of "OpenJDK" particularly WRT Oracle?

I'm not sure what this question even means, but frankly given Microsoft, IBM and Amazon are all building and distributing their own builds of OpenJDK I don't think there are any significant legal issues, these are all companies with teams of lawyers on retainer.

Re: Revisiting Java in 2021 – Part II

#57

Earlier quoted context omitted.

The Oracle License FAQ is scary and opaque. https://www.oracle.com/za/java/technologies/javase/jdk-faqs....

It is, I definitely agree, but the statement I quoted is pretty darn straight-forward.

But it's also wrong. Is there any legal precedent establishing what the "GPL with classpath exception" even means? Does each build of the OpenJDK come with it's own license?

https://softwareengineering.stackexchange.com/questions/1194...

Re: Revisiting Java in 2021 – Part II

#58
post #5

> There are ... many well-written books on how to program it effectively Would anyone be able to recommend a good resource for quickly learning modern Java for experienced programmers that already know, let's say, one of {Python,Javascript} AND one of {Go,Rust,C,C++}, but have zero JVM experience? (Ideally the resource would also teach some relevant things about the JVM itself rather than the Java language specifical…

I'd be surprised if you found any dramas with the language. What will keep you in the office to all hours is the ecosystem. Now the ecosystem is probably best in class so don't mistake this as a slight, but it's huge and complex. Learning Gradle (or Maven), understanding how to make building java apps fast (because the default is slow package assembly times), learning some of the large frameworks (if you go down that…

You can’t avoid spring unless you’re in a small shop. It’s basically mandated/standardized at most places since “everyone knows it”.

Re: Revisiting Java in 2021 – Part II

#59

Thanks for article. Today I learned about Project Leyden, whose primary goal will be to address the long-term pain points of Java’s slow startup time, slow time to peak performance, and large footprint. I just recently started to explore Quarkus, GraalVM to optimize Java microservices for cloud architecture. It's good to know that Java moves into that direction. https://mail.openjdk.java.net/pipermail/discuss/2020-Ap…

> to optimize Java microservices for cloud architecture I'm kind of curious about this. What kind of lifetimes are you looking at for JVMs? Are you trying to use Java in lambdas on demand to user requests? What kind of warmup time are you seeing right now?

Lambdas, commandline applications, everything which needs startup times in the range of a few milliseconds.

Re: Revisiting Java in 2021 – Part II

#60
post #39
post #7

I use Java every day, but we're stuck with Java 8 because of the confusing and frankly scary licensing around later JDKs. I would love to move to 17 but I need something to show to the C-levels that gives them warm and fuzzies around the license. Does such a thing exist? EDIT: I find it quite depressing that so many want to attack people for being confused around Java licensing. I submit that it is confusing on its f…

Java and the OpenJDK have become more free than it was before, just don't use the OracleJDK if you don't like their commercial license. Instead use the OpenJDK.

Exactly. There is zero technical reason to use the Oracle JDK. OpenJDK licensing is GPLv2 with the classpath exception. Nice and simple. If you want to get your arm twisted and pay more, Oracle indeed provides you that option. You can also get a nice linux distribution from them and a database. And companies actually exist that buy all those things from them.

But for the rest of the world, you can also get certified JDKs from Azul, Amazon, Red Hat and a few others. All fine choices. Pretty much the entire financial industry, including some of the most conservative companies on the planet, depends on Java and I doubt most of them are paying Oracle for that. Why would they?

Post reply on HN