r/programming • u/henk53 • Mar 22 '22
Java 18 / JDK 18: General Availability
https://mail.openjdk.java.net/pipermail/jdk-dev/2022-March/006458.html34
u/pcjftw Mar 22 '22
laughs in J2SE 1.4 𤣠(the laughing helps hides the pain)
28
u/i9srpeg Mar 22 '22
lol no generics
19
u/thenickdude Mar 22 '22
Since generics are implemented using erasure, you can actually compile 1.5 Generics code to 1.4 bytecode:
https://alblue.bandlem.com/2010/10/compiling-java-generics-with-14.html
5
2
u/karmakaze1 Mar 26 '22
I think you can go farther, if you don't use the Java 8 runtime classes, should be able to retrocompile (using various retrocompile tools) 1.8 lambda -> 1.7 -> 1.6 -> 1.5, then 1.4. In theory.
7
7
5
u/lurker_in_spirit Mar 22 '22
Nice. Is the repo in CVS or SVN?
15
u/pcjftw Mar 22 '22
source control? you mean folders called "_v2backup_2001" as well as email right...
1
2
u/orthoxerox Mar 23 '22
VSS, plus a bunch of backups in email because VSS kills your repo when it has a bad day.
4
u/tuldok89 Mar 22 '22
Lol. Back in In my old employer, we had this app that required J2SE 1.4 up until 2015. It also used an ancient version of Oracle forms that would only run up to IE8. We also had to keep a copy of Windows XP running beyond its support date just for the same app. I think it was called Intergraph Smart Materials.
1
u/u_tamtam Mar 22 '22
I've heard about this thing. Fortunately it doesn't look too bad these days: https://docs.hexagonppm.com/r/en-US/Intergraph-Smart-Materials-Release-Bulletin-2020/Version-2020-10.0/1087736
4
Mar 22 '22
Seriously though, why? Novody is forcing you to use shitty old tech
8
u/Booty-Juice Mar 23 '22
Except the people paying you to support legacy code
6
u/nutrecht Mar 23 '22
There are also people who will pay you just as much while working on a modern system.
In the current market you only have yourself to blame if you're working with Java 1.4.
5
Mar 23 '22
Youâre not supporting it super well if youâve let it rot so bad youâre not even able to do security updates. Thatâs how you get shit like equifax.
Donât justify being so far behind. Itâs fine to be behind but not comically so
If people are paying you for this kind of nonsense youâre basically scamming them
I just looked it up, js2e 1.4 was EOL in 2006. Id consider this negligent âmaintenanceâ if youâre still on it almost 20 years later
Source https://www.oracle.com/java/technologies/j2se-142.html
7
u/kbb65 Mar 23 '22
the big takeaway i see is there's almost no reason to write scala anymore.
the 2 things scala has going for it:
collections functions are probably the best of any language
error handling with EitherT + for comprehension probably best of any language
but everything else is equivalent to java or worse
2
1
u/PM_ME_WITTY_USERNAME Mar 23 '22
Anything exciting in Java 18? I haven't done Java since university
4
u/nutrecht Mar 23 '22
Java has a 6-month release cadence so each individual release is quite small. Java 18 itself mostly has a ton of small fixes. The only somewhat interesting feature of 18 is the embedded web server.
But Java 16 for example added records, which was a massive change.
2
u/PM_ME_WITTY_USERNAME Mar 23 '22
How's an embedded web server different from a regular web server?
5
13
u/Determinant Mar 22 '22
Wow, over 1000 bug fixes in this release! I didn't realize that there was so much tech debt in the JDK.
I wonder if most of those bugs were newly introduced in intermediate beta builds or whether they were bugs that were live in JDK 17.