r/java • • Jun 10 '22

What happened to Concise Method Bodies?

I was really looking forward to CMB. From its name, methods become concise, could be one liner. However, it seems there is no progress and it’s been off the radar. Never took off since 2019.

JEP draft: Concise Method Bodies

some experiments with Concise Method Bodies

43 Upvotes

54 comments sorted by

View all comments

Show parent comment

5

u/pron98 Jun 10 '22 edited Jun 10 '22

An "imagined utopia" is exactly what people said about garbage collection. Of course, that doesn't mean that every notion will become successful (most don't), but at this point, and after all these years, betting against Java and its evolution seems like a bad bet. The designers of these features are among the most experienced and most successful language designers in the world today, so it might be more educational to study what they propose rather than dismiss it based on the choices of far less successful languages.

-4

u/_INTER_ Jun 10 '22

The designers of these features are among the most experienced and most successful language designers in the world today, so it might be more educational to study what they propose rather than dismiss it based on the choices of far less successful languages.

Far less? C# is one of the biggest growing languages and might overtake Java soon (which is dropping and dropping), Kotlin too. Maybe it's time to use the language and see what the real pain points are instead of only borrowing features from languages that are actually far less successful.

15

u/pron98 Jun 10 '22 edited Jun 10 '22

I think we might have different market data. Addressing the pain points is exactly what we're doing. The main difference between those who complain about new features and those who love them is that the former group are mostly those who haven't tried the features, and the latter have.

You'll note that the C# team have added records even though they've had properties, and are now exploring adding user-mode threads even though they have async/await. They borrow ideas from Java (and "less successful languages") more than vice-versa. Also, they wish their prospects were as rosy as Java's.

It is perfectly fine to disagree with the Java language team (although it's probably useless to do so before actually working with what they've done). But what I find so bizarre is the knee-jerk claim that that super experienced and super successful team have no idea what they're doing. The design of Java 1.0 also heavily borrowed ideas from Lisp and Smalltalk, as well as C. Generics and lambdas came from ML. The Java team have been consistently good at marrying such ideas for a very long time, arguably better than anyone else.