Pattern matching in switch statements (calling them match statements would then be more fitting), a nice way to deal with nulls, and proper sum types (aka tagged unions, like enums in Rust) and Java would be pretty up-to-date.
Oooh that's a good idea. Does that already exist in other languages? I've not seen it before.
What's new in Java 12, 13 and 14
131–136 of 136 posts
Re: What's new in Java 12, 13 and 14
#132Re: What's new in Java 12, 13 and 14
#133Re: What's new in Java 12, 13 and 14
#134Earlier quoted context omitted.
> Other future changes I am excited for, but don't expect to get implemented any time soon, if ever, frankly, are: Most if not all of them will land in the next few years. In fact, working on those precise features is what most of the OpenJDK team does. > Improved native code interop. I consider this to be both a language and VM change. That would be Project Panama, making its initial, partial delivery in JDK 14 (GA…
Utterly dumb question but why is tail recursion necessary in the JVM given that the compiler is better placed simply to turn recursion into a loop. TR removal should be done best at the highest level I'd think.
How do you think it should do this? While keeping the semantics of Java.
Re: What's new in Java 12, 13 and 14
#135Earlier quoted context omitted.
I’m wondering when Java 2 comes. Java 12 is actually 1.12...
They dropped the pretend Java 7 => Java 1.7 thing already. They don't even do 7u80 style versions anymore.
EDIT: It went Java 1.4 -> 5.0[0]
Re: What's new in Java 12, 13 and 14
#136Earlier quoted context omitted.
Java 8 was released March 18, 2014, so they had 5 years to upgrade. But I see your point about the new release schedule, where the LTS version is not supported after 6 months. I think the companies need to change their mindsets. New Java version are backwards compatible, as they introduce changes gradually. It is actually more dangerous to wait, because they risk that some features (like GC) are deprecated after 4-5…
I still need to pass weird flags for Tomcat to make it work under Java 9+, almost 6 years later. Modules were a mistake. If not for modules, a lot of people would have migrated to 9+.
So on reflection I think it was a good move. Most frameworks and libraries work on modules now.