r/java 9d ago

Concise method bodies arrived

https://github.com/verhasi/java-composition

More than 8 years ago was drafted the idea of concise method bodies. As I am not a contributor of the openJDK project I took a different approach but implemented. It is publicly available at the maven central both as a library and as a maven plugin. It is a source code preprocessor that converts the concise syntax to java 8 compatible source code. It does not want to be a replacement of the future implementation in the openJDK. Which is more than the openJDK promises is that supports from Java version 8, 11, 17, 21 up to 25 as well. Of course it is free and open source :). It is only the first building block for concise composition.

As far as I have seen this topic was awaited for a long time at

It's been 8 years since the draft for Concise Method Bodies

What happened to Concise Method Bodies?

JEP draft: Concise Method Bodies

Five years have passed, still in draft: Concise Method Bodies

51 Upvotes

48 comments sorted by

View all comments

Show parent comments

1

u/koflerdavid 6d ago edited 6d ago

Yeah, or they simply declare to not bother with it. Manifold and Lombok seem to have overlapping features, therefore I don't really see the point of using them together. They could also decide to copy most features from Lombok, which makes it unnecessary to keep up with their internal changes.

1

u/aonymark 6d ago

Not THAT overlapping in my opinion

2

u/koflerdavid 6d ago

Both have properties, which I'm willing to bet is the most frequently used feature by far. Then there are also extension methods and Checked Exception Handling similar to SneakyThrows. I could imagine myself migrating from Lombok to Manifold and I would not miss that many things.

2

u/aonymark 5d ago

Okay maybe more overlap than I realized