Hi

I think we need to decide how much is the fair usage of lombok. I have used
it previously and it does good job of taking care of removing boilerplate
code. However, I feel care must also be taken to determine how much we use
it because chances are that the code might not work (potentially) if you
upgrade the compiler - for example upgrading from Java 8 to 9 or Java 9 to
10 since it adds bytecodes at the compile time.

With its heavy usage, it is also likely to affect the build time as well.
There are ways to mitigate such issues however [1] but care must be taken.

As far as IDEs are concerned, it is fairly easy, be it Eclipse or IntelliJ.
WIth Eclipse, you would typically install it as a plug-in and then Eclipse
should not complain about compilation issues.

I think we need to evaluate all these pros and cons before deciding on its
acceptance. I have not used to more than using it for generating getters
and setters.

[1] -
https://stackoverflow.com/questions/15518405/lombok-slowing-down-build-process-in-large-project#:~:text=Lombok%20is%20an%20annotation%20processor,sources%20or%20throw%20compiler%20errors.

Best,
Girish



On Tue, Jul 28, 2020 at 7:12 PM Eugen Stan <eugen.s...@netdava.com> wrote:

> 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
>

Reply via email to