Java 22 Released
81–90 of 178 posts
Re: Java 22 Released
#82Maybe my favorite feature in this release: https://openjdk.org/jeps/463 Finally solves the inscrutable Hello World program! Yes, it's just ergonomics for early beginners. But could be the difference in whether or not someone new to programming sticks with Java or not.
Actually a nice feature. This solves the public static void main string args issue. Still if I need JVM then Scala or Kotlin are still preferable over Java. Obligatory Java for the Haters in 100 Seconds: https://www.youtube.com/watch?v=m4-HM_sCvtQ
Re: Java 22 Released
#83Earlier quoted context omitted.
Java continues to evolve to a bad Groovy.
How so? I don't think there are many good things to say about Groovy, but I generally agree with most new features introduced to Java. What do you think Groovy does better?
- triple-quote strings / blocks
- minimal class boilerplate (this posting)
- closures (Java closures are worse IMO)
- usable hashbang for UNIX
- I think java has strings in switch now, don't they? Do they have expressions?
WAIT, does Java STILL force you to write getter/setters?
Re: Java 22 Released
#84Earlier quoted context omitted.
Java continues to evolve to a bad Groovy.
Groovy itself is a bad Groovy.
I get gradle is a disaster (but that's more of a poorly managed and evolved DSL problem)
But ... does anyone use Spock and think "groovy sucks"? Yeah, I doubt it.
Re: Java 22 Released
#85Maybe my favorite feature in this release: https://openjdk.org/jeps/463 Finally solves the inscrutable Hello World program! Yes, it's just ergonomics for early beginners. But could be the difference in whether or not someone new to programming sticks with Java or not.
Maybe in another ten years they'll remove System.out.println and allow for a simple println to be used. Or maybe we'll all move to Kotlin by then.
Re: Java 22 Released
#86Earlier quoted context omitted.
Maybe in another ten years they'll remove System.out.println and allow for a simple println to be used. Or maybe we'll all move to Kotlin by then.
You can statically import System.out if you are so inclined.
Re: Java 22 Released
#87Earlier quoted context omitted.
How so? I don't think there are many good things to say about Groovy, but I generally agree with most new features introduced to Java. What do you think Groovy does better?
- String interpolation - triple-quote strings / blocks - minimal class boilerplate (this posting) - closures (Java closures are worse IMO) - usable hashbang for UNIX - I think java has strings in switch now, don't they? Do they have expressions? WAIT, does Java STILL force you to write getter/setters?
switch on strings is there, as are switch expressions.
records now removes the need for getters in immutable contexts.
Re: Java 22 Released
#88Why would I use Java 22 over Kotlin?
Even only considering JVM languages you run in to way too many options for the question in itself to be worth your time as a serious discussion.
IMO - use whatever you and your team like best and that suits your needs. Java is great for hiring new devs and is arguably the most well established in an enterprise settings.
If you want an actual answer: Personal preference.
Re: Java 22 Released
#89Earlier quoted context omitted.
8 reached EOL in the last year or two. I think 11 is still under LTS. Part of the problem is the changes made between 8 and 17 could be incredibly disruptive depending on your libraries. If they had stuck to not using sun.* stuff you were pretty safe, but a few very popular things did. Then somewhere in there a lot of the common server stuff moved from javax.* over to jakarta.*. Both were needed and very good, but co…
> 8 reached EOL in the last year or two Java 8 is still under Extended Support until 2030 (and indefinite sustaining support). Java 11 left Premier Support September 2023. "Java SE 8 has gone through the End of Public Updates process for legacy releases. Oracle will continue to provide free public updates and auto updates of Java SE 8 indefinitely for Personal, Development and other Users via java.com". https://www.o…
So we have to stick to OpenJDK which means 8 doesn’t receive security updates and is untenable.
Re: Java 22 Released
#90Earlier quoted context omitted.
The FFI is also an artifact of CLR type system and the ability of have proper stack value based types.
They will eventually bring value types to Java with Project Valhalla.