Live data from Hacker News

What's new in Java 12, 13 and 14

java.christmas

41–50 of 136 posts

Re: What's new in Java 12, 13 and 14

#42
post #32

Sigh, I know new language features are cool, but I highly doubt the growing dominance of Python and JS is a question primarily of language features. Python has a REPL and the outstanding tooling built on that along with an ecosystem of libraries where a default use case is the design choice. That all leads to "fast" development which what a lot of people care about. JS has the default use app deployment area: browser…

Right, but will We Assembly be a JS killer? If I can stay in Python and target the browser without the fuss and bother of JavaScript, why would I?

Nothing prevents you from compiling your Python code to JavaScript blob and run it without really bothering with JavaScript. You don't need wasm for that.

Re: What's new in Java 12, 13 and 14

#43
post #25

Earlier quoted context omitted.

Some companies spend longer than six months to discuss/agree to a 'major version upgrade' of software. Naturally the gap between (say) Java 10 and 11 is fairly small, meaning it shouldn't take many months to merely discuss an upgrade - but not all companies have got round to the regular-release way of thinking.

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+.

Re: What's new in Java 12, 13 and 14

#45
post #22

As someone that used to write a lot of C#, I find that the language is changing so often that it's hard to know what's new and what's been around for years. In contrast, Java hasn't changed all that much over the years, and I wonder if an approach of taking the more useful features from C# and ignoring some of the others would be a good approach. I often wonder how Java developers feel when they look over at C#, and…

I like C# more than Java because it is improved more often. Conservatively of course, but each version adds some new good stuff to play around with. Java felt like it stayed the same for so long.

Re: What's new in Java 12, 13 and 14

#46
post #22

As someone that used to write a lot of C#, I find that the language is changing so often that it's hard to know what's new and what's been around for years. In contrast, Java hasn't changed all that much over the years, and I wonder if an approach of taking the more useful features from C# and ignoring some of the others would be a good approach. I often wonder how Java developers feel when they look over at C#, and…

Java has changed a lot too. Its a real problem in an old code base as there are different generations of developers writing in different styles making the whole thing inconsistent and confusing.

Re: What's new in Java 12, 13 and 14

#47
post #32

Sigh, I know new language features are cool, but I highly doubt the growing dominance of Python and JS is a question primarily of language features. Python has a REPL and the outstanding tooling built on that along with an ecosystem of libraries where a default use case is the design choice. That all leads to "fast" development which what a lot of people care about. JS has the default use app deployment area: browser…

Java's development is still mostly not in the language (although some developers focus on language changes). Most of the improvements in recent versions were to GCs, low-overhead deep profiling, and general performance -- neither Python nor JS compete well in these areas. In addition, the upcoming JDK 14 has the jpackage tool which would make it easier to deploy desktop applications, and there's a lot of investment reducing warmup time (CDS), AOT compilation that appeals to some microservices and maybe mobile/WASM apps, easy FFI and native memory access that can help with machine learning (Panama) and, yeah, the REPL. What features would you like to see?

Re: What's new in Java 12, 13 and 14

#48
Is it me or does the below sound condescending?

Trying new features is a good way to broaden your skill set, and if there is something you strongly dislike about the usability of a feature you can even provide feedback to the JDK developers.

To me it reads like: Try our experimental features because that will make you a better (rounded | paid) developer, and if you really really want you may even provide feedback.

Re: What's new in Java 12, 13 and 14

#49
post #20
post #5

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.

Scala has had this for a long long time: https://docs.scala-lang.org/tour/pattern-matching.html

Re: What's new in Java 12, 13 and 14

#50
post #48

Is it me or does the below sound condescending? Trying new features is a good way to broaden your skill set, and if there is something you strongly dislike about the usability of a feature you can even provide feedback to the JDK developers. To me it reads like: Try our experimental features because that will make you a better (rounded | paid) developer, and if you really really want you may even provide feedback.

No offense, but that's probably you. Even if I try to read that as condescending, I have a hard time doing it.

I read that as: trying new stuff in code generally makes you a better programmer. And when you test stuff that's still in an experimental phase, the language designers are probably still open to feedback from the broader public.

Post reply on HN