I find it so funny how for years I fell for the idea that Java is somehow stodgy or outdated and now I find myself ridiculously excited for its new features. I see other “trendier” languages that are just not keeping up.
Sorry I don't share your enthusiasm. Not very interested in the new features.
I'm still waiting for real properties like C# does.
Or, having related several public classes in the same file and not a single main class with additional private classes. Like C#, PHP, C++, Object Pascal does.
The problem with properties is that too many Java developers strongly oppose this feature and don't want it in the language, as they find it harmful.
The problem with multiple public classes is compilation. If you compile A.java, and it refers to class B which isn't in A.java, the compiler knows to look for it in B.java. If it could be in a different file, how do you propose finding it? This is particularly important for source code mode (but not just that mode), which many people seem to like (and either isn't supported by the languages you mentioned or they use a different import style that tells the compiler where the symbols are). So this is possible - if you're willing to give up on other good things. But we are looking into compilation speed, so maybe, if we like some new compilation strategy, this could be revisited.
In general, the point is that often there are features that people want but that have downsides either for them (and they just haven't thought about the downsides) or for others. We can't just think of the pros; we also have to consider the cons.
You say "The problem with X is...", but really you mean "Amongst the problems with X, there is..."
Even if no one opposed properties, and even if it was a good idea (spoiler: not), that ship has sailed. The language made design choices long ago that would make "real properties" (whatever that means) look bolted on, because they would be bolted on.
30
u/josephjnk 3h ago
I find it so funny how for years I fell for the idea that Java is somehow stodgy or outdated and now I find myself ridiculously excited for its new features. I see other “trendier” languages that are just not keeping up.
I’m stoked for structured concurrency especially.
6
u/vips7L 2h ago
Automatic heap sizing for ZGC! Can’t wait for this to be in G1
4
u/Afonso2002 3h ago
So is jdk29' time to shine.
The first build will be available in december?
1
u/Cell-i-Zenit 32m ago
Is it ever realistic we get features like "??" and "?." from C#? I quite often still have to juggle null
(its just an example please dont kill me, i know this could have done written differently, but i dont know of a way which is cleaner tbh)
0
u/griso84 2h ago
In 2026, the OpenJDK group could make its website mobile-friendly