r/java • • 11d ago

Evolving the Java Language: An Inside Perspective

https://www.youtube.com/watch?v=fJP3s1A5jGY
122 Upvotes

36 comments sorted by

View all comments

Show parent comment

1

u/pron98 6d ago

The problem is that structural types solve some problems and cause others. A well known problem they cause is inscrutable error messages, like the ones we see in Haskell and even TypeScript.

As for budget, it's not about the development budget but the "complexity budget" of the languages. Many developers like languages that are very feature-rich, but many don't. On average, I think that the relatively simpler languages also tend to be more popular. We'd like to keep Java closer to the simpler end of the spectrum. You are absolutely correct that Scala, Rust, Kotlin, and C# are richer languages, but they're also much less popular languages, and we are indeed trying very hard to keep Java from turning into such a language. You call that "progress", but I disagree. For one, a language can still evolve and grow only slower. Second, there are other ways of making progress without adding so many language features. For example, I think virtual threads are more advanced than async/await, and C# significantly hindered its own progress by adding that language feature. I also think Zig is more advanced than Rust even though it has like a tenth of Rust's features. Or, going back to Java, a very advanced JIT is able to make simpler and more general abstractions, such as virtual dispatch, competitive with the selection of narrower abstractions that C++ or Rust have to offer because their compilers are more limited in the optimisations they can apply.