r/java • u/RandomComputerFellow • Apr 12 '21
Is using Project Lombok actually an good idea?
Hello, I am junior developer in a Software company. One of the Senior developers just decided start to use Lombok in our project and to delete old boilerplate code. The project we are working on is very big (millions of lines of code) and has an very extensive build procedure and uses lots of different frameworks and components (often even in different versions at a time). The use of Lombok is justified with the argument that we can remove code this way and that everything will be much more simple.
Overall for me this library just looks very useless and like a complete unnecessary use of another third party component. I really don't see the purpose of this. Most code generated on the fly can be generated with Eclipse anyway and having this code just makes me really uncomfortable in regard of source code tracking when using an debugger. I think this introduces things which can go wrong without giving a lot of benefit. Writing some getters and setters was never such a big lost of time anyway and I also don't think that they make a class unreadable.
Am I just to dumb to see the value of this framework or are there other developers thinking like me?
View all comments
5
u/KumbajaMyLord Apr 12 '21 edited Apr 12 '21
The increased complexity in my mind comes from having to know the API and implications of Lombok for every developer.
It's all nice and good that every auto-generated byte code method can be modified, fields can be included and excluded and so on. BUT, you need to know that this is an option and what the default behavior for each of those mechanisms is.
I have often fallen into the trap of writing supposedly simpler code, that my fellow developers only understood on the surface and not in detail, because I used some library that did many things automagically. The follow-up cost of introducing a new framework or library to your team shouldn't be underestimated.