Live data from Hacker News

Revisiting Java in 2021 – Part II

avanwyk.com

31–40 of 146 posts

Re: Revisiting Java in 2021 – Part II

#31
post #9

Earlier quoted context omitted.

OpenJDK: "Oracle’s free, GPL-licensed, production-ready OpenJDK" I don't know what could be more convincing than an explicit open license.

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.

Re: Revisiting Java in 2021 – Part II

#32
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…

Modern Java in Action is a fantastic book. It goes into Streams, Optionals, new Date Time API, basically the "big features".

More recent changes are relatively smaller and probably don't need a full book to cover.

Would recommend it after Effective Java (3rd edition).

Re: Revisiting Java in 2021 – Part II

#33
post #11

Earlier quoted context omitted.

Perhaps point out how many non-Oracle commercial JVM vendors exist? They might not trust Oracle to be sane, but Red Hat, Microsoft, SAP and Amazon are all very big names in the industry who offer their own JDK distributions, some of them also offer commercial support.

Do you know what the legal relationship is between Red Hat and Oracle is? I think Oracle v Google has sent shivers of fear through anyone wanting to rely on Java, including through an intermediate, because the strength of the relationship is only as strong as the weakest link in the chain. In other words, what is the risk that Red Hat will be sued by Oracle someday over their use and support of Java?

Let’s say Oracle sues Red Hat (now IBM), so what? Are android devs all totally screwed because Oracle sued Google?

I’m not going to defend Oracle’s business practices but this seems like FUD. You can use Red Hat, Amazon, or Azul’s jvm. If it’s too “scary” to do so for your company than you need better executives and/or lawyers.

Re: Revisiting Java in 2021 – Part II

#34
post #11

Earlier quoted context omitted.

Perhaps point out how many non-Oracle commercial JVM vendors exist? They might not trust Oracle to be sane, but Red Hat, Microsoft, SAP and Amazon are all very big names in the industry who offer their own JDK distributions, some of them also offer commercial support.

Do you know what the legal relationship is between Red Hat and Oracle is? I think Oracle v Google has sent shivers of fear through anyone wanting to rely on Java, including through an intermediate, because the strength of the relationship is only as strong as the weakest link in the chain. In other words, what is the risk that Red Hat will be sued by Oracle someday over their use and support of Java?

Java is GPL2+Classpath Exception licensed.

Re: Revisiting Java in 2021 – Part II

#35
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 don't have an answer to your question, but I would suggest the following: skim over Java 5 syntax. It should be very easy to understand for anyone with programming experience. Explore Java 8, 11, 17 features, but try to map all the syntax to Java 5, because those features usually are just a syntax sugar and I think that it's easier to understand those features this way. Do not dive into standard library too much. I…

> After that you have to choose a framework, because Java applications are very framework-heavy ones. And that's where most of complexity comes from. People usually use Spring these days, so that's probably would be the most reasonable choice. There's no easy path, you'll struggle a lot and that's unavoidable. Modern Java Frameworks are full of hard to grasp concepts, tricky magic code and 20-year old roots buried in the depths of stacktraces.

Honestly that does not sound like a culture/ecosystem it is pleasurable to work within. Why wouldn't people choose something more modern and lightweight than Spring?

Re: Revisiting Java in 2021 – Part II

#36

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?

Compile time verification of correct syntax and spelling is important aspect

Re: Revisiting Java in 2021 – Part II

#37
post #9

Earlier quoted context omitted.

OpenJDK: "Oracle’s free, GPL-licensed, production-ready OpenJDK" I don't know what could be more convincing than an explicit open license.

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

This FAQ is about Java SE builds, not the OpenJDK builds.

Java is Still Free (2019) https://medium.com/@javachampions/java-is-still-free-2-0-0-6...

I don't know if there is a more recent version

Re: Revisiting Java in 2021 – Part II

#38

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…

> I think if the Scala creators had been a bit less obsessed with symbology

This might not be something to pin on the language designers, if you're using certain third-party libraries. Indeed it is possible to name a method pretty much whatever you want, with some constraints[0]. Wanna call it "!^"? Go ahead! But, this is afoul of the naming convention in many cases[1]--acknowledging that the convention may have previously been a bit more lax in this regard.

OTOH the distinction between "::" and ":::", and the implications of stuff like "[0] https://stackoverflow.com/questions/7656937/valid-identifier... [1] https://docs.scala-lang.org/style/naming-conventions.html

Re: Revisiting Java in 2021 – Part II

#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.

Re: Revisiting Java in 2021 – Part II

#40
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 other ecosystems who parrot things they hear on Internet forums.

OpenJDK is free and open source. It imposes no license restrictions on your server-side applications, and these days imposes virtually no limitations on retribution of the JDK itself with traditionally-shipped applications.

Oracle's own binary build of the OpenJDK source code is a commercially licensed thing, because it comes with some extra proprietary tools that people might care about when profiling applications in a large enterprise. But there are other OpenJDK builds with no cost or licensing restrictions whatsoever, from Azul, IBM, Amazon, and others. Outside of the largest and most conservative Oracle shops, virtually everyone uses one of these free JDK builds.

So much nonsense FUD is made from "lack of commercial support" for the non-Oracle JDK builds. Not "having someone to sue" if something goes wrong, etc. For one thing, who are you supposed to sue when you have a problem with Python or Node? If you want someone to be financially liable to you, then you have to financially pay someone to take on that liability. In practice though, have you ever even heard of a lawsuit over a JDK bug? This is nonsense.

Post reply on HN