Re:JEP 457: Class-File API for Parsing, generating, transfor...
by bafe on Tuesday September 26, 2023 @04:15PM
(#37665243)
This design note could be of interest: https://github.com/openjdk/amber-docs/blob/master/eg-drafts/...
Re:JEP 457: Class-File API for Parsing, generating, transfor...
by jmaker on Wednesday September 27, 2023 @06:45AM
(#37672823)
Totally, and the With annotation is a bliss. Hope to have it at a syntax level someday, just like in Kotlin. In addition, you can decompile Lombok annotations straight into your code proper and change what you need, Builder methods for validation, say. Lombok is great for DX, especially if you have experience with more recent languages.
I personally use the @Builder annotation on records with more than 3-4 fields. I find it much more readable than a long list of arguments to the constructor.
I also use other annotations, but I could live without them if a future version of Java provides a builder-like pattern (or named arguments)