There are so many huge features in Java 21, especially around scalability and data handling - I feel like it may be a watershed moment that brings Java back to the forefront as a leading choice for heavy lifting, data focused work. As an LTS release I could see it forming the next long term baseline that people build on for a very long time.
I guess I'm lumping a lot of JDK20 stuff in there as well since most folks will hold off migrating until LTS releases arrive with features. But the combination of things like Record Patterns, Virtual Threads, Foreign Function and Memory API and the Vector API will add up to a very powerful set of features for building data focused applications.
Those features are in incubator/preview mode in Java 20. While they might be released with 21, they might as well not. So I wouldn't hold my breath, unless you can jump on preview features (and if you can, why even care about LTS).
I'd wager TS/node/etc going the way of PHP and JQuery in the next decade. SPA will go full WASM (which you could technically use Java for) and non-SPA will be built off better browsers (e.g. WebKit adding nested CSS) and HTMX-style solutions. Note that it doesn't mean everyone will be rolling their own WASM-based engine, but that there will be a bunch of public WASM-based engines (like PyScript/Pyodide stuff) that are tailored for specific domains than one-size-fits-all React.
This leaves "full stack JS" in an awkward middle ground. Sure, you could still use it on your backend (like PHP), but why?
We use JS because there were literally no other practical options, but better browsers and WASM are providing new options.
Java has really good runtime monitoring capability. Being able to get a thread dump from a production system, or generating Flight Recorder logs for offline analysis is incredibly useful. Is there something similar in the Node ecosystem?
I've been doing backend dev in Node/TS for the first time recently after working mainly in Python or Ruby for many years. And overall I have to say I'm not very impressed. The tools and frameworks are immature and it's annoying having to deal with all the unfixable flaws in JS.
If I were starting a new company today I would certainly seriously consider Java or Kotlin instead.
For the same reasons you'd pick golang over python/TS.
Only you'll get higher-level abstractions (pattern matching, FP-style maps/flatMaps&Co throughout the standard library) and powerful collections with full support for generics.
I personally love scala: It's been my main language at work for well over a decade. However, the barriers of entry are real, especially since arguably the most popular styles of the language demand learning the most esoteric parts of the language straight away. If your organization is well seeded with very experienced people, they'll be able to train people up, but it's oh so easy for things to go wrong.
If you are looking for all the advanced type system features, kotlin is definitely not going to put you in the same spot, but if you are hiring Java devs, training them is a far easier lift: They can mostly train themselves.
I'd hope that after another version or two of scala3, when more organizations are happy running it in production, we might have an easier onboarding road, where we don't have to explain implicit parameters, implicit conversions and implicit classes, just so that we can get to the real meat that is the mechanics of type classes. But, as is, there's good defensible reasons for many teams to go try Kotlin first.
Agreed. If somebody doesn't know Java and decides to jump to Kotlin, I will have the same question: why not Scala which is used more than Kotlin on computers (i.e. non-Android)?
I'm not necessarily advocating for Kotlin but the key argument would be supportability. Scala is a very complex language+ecosystem with idioms many people are highly unfamiliar with. Comparatively, Kotlin can be written idiomatically in a way that the vast majority of developers will readily understand and quickly come up to speed with.