La 28.07.2020 16:10, Michael Brohl a scris:
Hi Daniel,
can you explain what the advantages and disadvantages are?
Is it worth the introduction of an additional framework, more complex
IDE configuration, an additional Gradle plugin and more memory
consumption and why?
Thanks for clarification,
Michael Brohl
Hi,
My 2c:
I think Lombok is great.
I've used it with my previous Java projects to reduce the amount of
boilerplate needed when writing Java code.
The lombok annotations are only applied during compilation so they don't
change the runtime behavior.
The cons are an initial quick setup and a very small learning curve.
The pros are less code to write and review and safer equals and hashcode
(they are generated) .
I would argue that some of the advantages regarding getters and setters
will be diminished once Records are adopted in Java (second preview)
https://openjdk.java.net/projects/jdk/15/
I believe this will be done probably in march 2021 and it will be in
time for the next LTS which hopefully it will be JDK 16 in september
2021 as per
https://www.oracle.com/java/technologies/java-se-support-roadmap.html .
That being said Lombok has advantages and can be used very easily.
I do think Lombok can be set without a plugin since grade has
annotationProcessor configuration
https://tomgregory.com/annotation-processors-in-gradle-with-the-annotationprocessor-dependency-configuration/
--
Eugen Stan
+40720 898 747 / netdava.com