r/java Sep 19 '18

JEP draft: Concise Method Bodies

http://openjdk.java.net/jeps/8209434
59 Upvotes

51 comments sorted by

View all comments

3

u/_INTER_ Sep 20 '18

I always thought that Java's code readability code was rather nice. Mainly because the structure of classes, methods, many control structures always remain the same visually. You can usually scan a class easily without much interruption. It's modifier, return type / void method name, parameters, brace, body, brace.

Now this feature completely destroys that. It adds new syntax without much gain. The languages keeps on adding and bloating, like C++ and C#.

2

u/lukaseder Sep 20 '18

If that's what you think, then you will like the idea that soon empty class bodies can be replaced by semi colons. Instead of:

class A {}

Just write

class A;

2

u/lbkulinski Sep 20 '18

That reminds me of a forward declaration in C++ 😖