Live data from Hacker News

Java 17 / JDK 17: General Availability

mail.openjdk.java.net

31–40 of 251 posts

Re: Java 17 / JDK 17: General Availability

#32

On its own, the features specifically for Java 17 aren't obviously that compelling, but the important thing is that Java 17 is an LTS, the last one of which was Java 11, 3 years ago. Since many organizations, including mine, stick to LTS releases, that means a lot of developers will get a big change in what they can do sometime in the next few months as they upgrade to the LTS. Among other things, this means that we…

Comprehensive list of all JEPs integrated since JDK 11: https://openjdk.java.net/projects/jdk/17/jeps-since-jdk-11

Re: Java 17 / JDK 17: General Availability

#33

I am skeptical about the "strong encapsulation" and in general, of all cases whey people tell me about something: "you don't need it, it's better for you to do it other way". Usually I know better what I need. There were cases when I needed to access the internals, e.g. fixing a prod issue. A quote from Thinking Forth comes to mind: > The newest traditional languages (such as Modula 2) bend over backwards to ensure t…

Fixing a prod issue by bypassing encapsulation and other programming practices sounds very much like accumulating technical debt. Encapsulation may be a lot more verbose, but it remains the best way to isolate software modules, to write better tests, and improve the overall reliability of software.

Re: Java 17 / JDK 17: General Availability

#36
post #12

Earlier quoted context omitted.

Primitive classes are being worked on in Project Valhalla.

I think this statement has been true since about 2014. Structs are nice, as they allow for control over locality, to a degree that is simply not possible in Java currently. But there is a second effect, which is possibly more important: If I can move gigabytes of my data into arrays of structs, then 1) I greatly reduce memory requirements (far fewer pointers), and 2) I greatly reduce the amount of work that GC has to…

Some features take a long time when you have millions of users and billions of loc. Goetz recently did a State of Valhalla interview here: https://www.youtube.com/watch?v=x1_DBqJrykM

Re: Java 17 / JDK 17: General Availability

#37

I am skeptical about the "strong encapsulation" and in general, of all cases whey people tell me about something: "you don't need it, it's better for you to do it other way". Usually I know better what I need. There were cases when I needed to access the internals, e.g. fixing a prod issue. A quote from Thinking Forth comes to mind: > The newest traditional languages (such as Modula 2) bend over backwards to ensure t…

In that case, I think a Java Agent is better suited to your needs. We have one we wrote that will intercept a class load and hot-patches the byte code.

This allows us to fix bugs in 3rd party software or the JDK itself until fixes can be released upstream and we don't wish to release an internal version of an artifact. Not something we use exclusively for obvious reasons, but it's a handy tool to have in the toolbox when we're forced up against a wall.

Re: Java 17 / JDK 17: General Availability

#39
Some other news in relation to the release:

- (Proposal) Moving JDK LTS versions to a two year cadence [1]. Java 21 will be next LTS instead of Java 23.

- Oracle JDK is now free for commercial and production use [2].

- A new Java developer site [3].

[1] https://mreinhold.org/blog/forward-even-faster

[2] https://blogs.oracle.com/java/post/free-java-license

[3] https://dev.java/

Post reply on HN