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…
Java 20 / JDK 20: General Availability
101–110 of 356 posts
Re: Java 20 / JDK 20: General Availability
#102Note 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.
Re: Java 20 / JDK 20: General Availability
#103Why 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.
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
#104I'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?
Re: Java 20 / JDK 20: General Availability
#105Java 8 is the best Java.
Or licensing, or having to rewrite too much of those apps for no perceived value. Who knows.
Re: Java 20 / JDK 20: General Availability
#106Earlier 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.
Re: Java 20 / JDK 20: General Availability
#107And 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
Re: Java 20 / JDK 20: General Availability
#108And 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…
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
#109Earlier 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
Re: Java 20 / JDK 20: General Availability
#110its 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?
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.