Java 22 Released

Incubating Vector API and Project Valhalla

  • Vector API is in its 7th incubator; commenters ask why it’s taking so long.
  • Several note it depends on Project Valhalla (value types) so vectors can be efficient, allocation-free value objects.
  • Consensus: progress is slow by design; JDK devs prioritize extreme backward compatibility and long-term planning.

Foreign Function & Memory Interface (FFI)

  • Many see the new FFI as the most impactful change, finally addressing JNI/JNA pain and closing a historical gap vs .NET/C#.
  • Experiences with early FFI plus jextract are positive; significantly less boilerplate than JNI, easier to adopt existing C libraries.
  • Some worry about the emphasis on library unloading, citing past instability with native libs.
  • Comparisons to .NET’s rich native interop surface (pointers, unions, function pointers, stackalloc, spans) highlight how far Java is catching up.

String Templates and Syntax Debates

  • Interest in String Templates (STR / fmt processors); ongoing debate about exact syntax, including prefix vs $"..." and use of backslashes.
  • This is framed as classic “bikeshedding,” but people appreciate that syntax is being reconsidered.

Beginner-Friendly main and “Hello, World”

  • The new simplified entry-point feature is praised as a big win for teaching and onboarding, likened to C# top-level statements.
  • Others dislike it as “fake” or special-case syntax that hides real concepts (classes, static methods) and complicates explanations.
  • Some argue Java remains too complex for beginners regardless; others think this modest ergonomics change helps.

Java vs Other JVM Languages

  • Recurrent comparisons with Kotlin, Scala, Groovy:
    • Kotlin is seen by some as strictly nicer for authoring and null safety, but others stress Java’s ecosystem, hiring ease, and long-term stability.
    • Scala is described by some as “dying” or overly complex; others counter that modern Scala 3 and its ecosystem are much more approachable.
    • Groovy is polarized: praised for scripting features (string interpolation, closures, DSLs) and criticized as a “bad DSL” (e.g., Gradle, Spock).

Other New Features & Ecosystem Notes

  • Stream Gatherers (JEP 461) generate interest for enabling new stream operations; one commenter laments lack of static extension methods.
  • Virtual threads are debated: some see them as Go-like, ergonomic high-concurrency; others argue prior user-mode async libraries already existed and worry about complexity and FFI blocking.
  • Java’s slow-moving, backward-compatible evolution is widely acknowledged; some appreciate the “boring” stability, others complain many projects are still stuck on Java 8/11 due to ecosystem breakage (internal APIs, javaxjakarta).
  • Practical macOS questions surface around which OpenJDK distribution to install; advice is that many desktop apps now bundle their own runtime, but distro variants can still be confusing.