Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Is Project Lombok suitable for large java projects? [closed]

Tags:

Is anybody out there using Project Lombok for a large scale production system? How does it influence your compile process (i.e. does it do two-pass compilation, slow it down, make it more fragile)?

like image 266
Jacob Avatar asked May 19 '10 13:05

Jacob


People also ask

Why we should not use Lombok?

The downside is it clutters your source with boilerplate code that take the focus off the important stuff. After 5 months, we're still using Lombok, but I have some other annoyances. The lack of a declared getter & setter can get annoying at times when you are trying to familiarize yourself with new code.

Should I use Project Lombok?

Use Lombok with Caution The power of Lombok cannot be underestimated or ignored. However, I would like to summarise the key points that will help you use Lombok in a better way. Avoid using Lombok with JPA entities. It will be much easier generating the code yourself than debugging issues later.

What is Project Lombok used for?

What is Lombok. Project Lombok (from now on, Lombok) is an annotation-based Java library that allows you to reduce boilerplate code. Lombok offers various annotations aimed at replacing Java code that is well known for being boilerplate, repetitive, or tedious to write.

Is Lombok widely used?

Lombok is a very popular library in the Java world that aims to help you write less repetitive code. Many people who are opposed to the use of this tool say that if you use a good text editor, you can take advantage of autocompletes and then you won't need Lombok.


1 Answers

Lombok doesn't do two-pass compilation. Technically it 'slows down' the compile process in that it runs in addition to the usual things that occur when you compile, but compared to the parse phase, the lower phase, and the translation phase, lombok barely even registers.

The major fragility issue is that editing lombokified code in an editor that is NOT either (A) dumb (i.e. notepad or a diff viewer), (B) eclipse, (C) netbeans, or (D) gets all its brains by running javac (e.g. vim with java plugin), it's going to suck. If that doesn't apply, the reduction of boilerplate should only make your code less fragile.

DISCLAIMER: I'm one of the two main developers of lombok :)

like image 127
Reinier Zwitserloot Avatar answered Mar 07 '23 05:03

Reinier Zwitserloot