Live data from Hacker News

Java 20 / JDK 20: General Availability

mail.openjdk.org

101–110 of 356 posts

Re: Java 20 / JDK 20: General Availability

#101
post #61

As a Clojure programmer, I don't care about any of the Java language features or improvements, but I'm super happy that I'm getting a state of the art JVM that is continuously developed, maintained, extended and optimized, over a time scale of decades. This is incredibly useful: having a good VM to run your code in, with good modern garbage collectors, is not an obvious thing (as many other languages have learned). T…

I second this, using jRuby

Re: Java 20 / JDK 20: General Availability

#102

Note all the new cool stuff is incubator and preview status and I'm a little worried that this will still be the case for the JDK 21 stable release.

I really hope to see the SIMD vector related improvements come through, I know there are some independent JDK code bases that have more evolved SIMD support, but for a lot of big data processing tools, switching away from jdk based languages appears to be the way SIMD related performance improvements have been realized because of this missing crucial feature set. JDK 11 was when this stuff was first in development, and it's truthfully insane that it hasn't fully been released yet.

Re: Java 20 / JDK 20: General Availability

#103

Why not just use C# instead? It was purposefully designed to address and correct the many mistakes of Java, and much more importantly, it's not owned by Oracle.

All the while, adding its own mistakes to the pile.

As an example, idiomatic Java style is moving away from getters/setters and instead favors builders and immutable types. That whole inheritance vs. composition concept is changing the way Java is being used.

Meanwhile, C# has baked getters/setters so deep into their language (as properties) that there's just no moving off of them. Have you tried making a Builder in C# - ugh. Much harder than it should be.

C# took the best of Java and ran deep into a cave with it. Meanwhile, Joshua Bloch's Effective Java has completely changed the way that "good" Java should be written and likely helped kickstart the whole revolution that is modern Java.

I agree with your sentiment in general. C# / CLR are truly remarkable engineering feats. But Java is starting to break away from its old molds and is seemingly adding agility as it goes.

As far as ownership. Java is not owned by Oracle any more than C# is not owned by Microsoft. They are both open languages with a majority backing supporter that yes, has a lot of influence over the languages. I'd argue Microsoft has more influence over C# / CLR than Oracle does on Java / JVM (but that's too close to call and probably too opinionated to suggest).

Re: Java 20 / JDK 20: General Availability

#104
post #90

I'm curious what is meant by a "preview feature, or second preview feature, or..." in a released product?? I don't suppose they are going to remove it later. So in what way is it a preview? Are they signalling that it might have breaking changes in the future?

Yes, they reserve the possibilty to completely redo or even remove these preview features. They are not enabled by default, you have to opt in with a compiler flag.

Re: Java 20 / JDK 20: General Availability

#105

Java 8 is the best Java.

Maybe that's why the two Java based products used by a customer of mine both have been using Java 8 since forever. One eventually switched to Java 11 last year.

Or licensing, or having to rewrite too much of those apps for no perceived value. Who knows.

Re: Java 20 / JDK 20: General Availability

#106
post #78
post #70

Earlier quoted context omitted.

Not the parent poster, but I can see why: IMHO, the best new feature for Java was try-with-resources (Java 7), and the second best new feature was all the functional stuff in Java 8. On the other hand, Java 9 started the introduction of several breaking changes (it took years before I stopped seeing updates to Java libraries to fix their compatibility with Java 9 and Java 11), so it can be seen why someone would thin…

IMO you're neglecting the thousands of improvements in the HotSpot runtime.

This is by far the biggest improvement to java in the last few years and plays a big role as to why a lot of different types of backend tools still are written in JVM based languages rather than switching it up. This said, hotspot still has some issues with taking full control of SIMD optimizations.

Re: Java 20 / JDK 20: General Availability

#107

And here I am still on Java 8 :/

Impressive how many companies are stuck on quite old java versions. We are a core API for payments services, and we need to force our customers to upgrade to newer Java versions as most of them don't support newer encriptyion protocols

Thank You for your service.

Re: Java 20 / JDK 20: General Availability

#108

And here I am still on Java 8 :/

I mean, that's OK though. Not sure why this is considered such a bad thing. You're missing out on some new language features, sure, but Java 8 is still reliable and rock solid. There's lots of companies that have hesitation or even inability to upgrade, hopefully there's at least some initiative and/or direction to do so. A company that is head-in-sand deliberately not upgrading from Java 8 is one thing. A company th…

> I mean, that's OK though. Not sure why this is considered such a bad thing

For existing software, sure. But the problem I guess is when there are a lot of newer projects starting and everyone is stuck on the older version

Re: Java 20 / JDK 20: General Availability

#109

Earlier quoted context omitted.

> I would prefer to have HKTs and typeclasses, so I may implement my own IO monad. I'm not a Java developer, and I haven't even read about higher kinded types or typeclasses (the theory side of programming is my weakness); but you picked my curiosity with this. Can you elaborate how concurrency done this way would look in Java?

Ideally like this: https://zio.dev/reference/#concurrency Or this: https://hoogle.haskell.org/?hoogle=fork

Other than STM, what is special? Almost everything there has an equivalent in traditional imperative programming.

Re: Java 20 / JDK 20: General Availability

#110
post #82

its amazing how much the world hasn’t been able to keep up with java. github PRs still have no syntax highlighting support for record and var

Why do you think that is? I thought things like the language server protocol made this a self service kind of problem. Who needs to be catching up?

Because syntax highlighting in JavaScript is (presumingly) not covered by LSP but by a generic syntax parser. And these updates take endless through the supply chain pipeline.

And as a side note: LSPs are not exactly free these days anymore. Java is not considering it core project (I guess outsourced to RedHat and Eclipse) and Microsoft has a very erratic behavior towards what is in and out the LSP or DAP.

Post reply on HN