Whatโs wrong with Lombok?
I'm just studying for a Java dev. but I've seen a lot of guys that are using Lombok. What's wrong with it?
— Artem Kuzyk (@ArtemKuzyk) December 25, 2022
There are two assumptions that drive building tools like Lombok:
— Anton Nizhegorodov ๐บ๐ฆ (@mintobit) December 25, 2022
1. You can save time by typing less code
2. You can save time by reading less code
It certainly "feels" like both are true. But they are not.
1/4
Engineers spend most of their time *thinking*. Cognitive ability is the bottleneck of everything they do, including reading and writing code. So what happens when your read code annotated with Lombok?
— Anton Nizhegorodov ๐บ๐ฆ (@mintobit) December 25, 2022
2/4
Additional tasks for your brain:
— Anton Nizhegorodov ๐บ๐ฆ (@mintobit) December 25, 2022
- Your brain has to decompile annotations
- Your brain has to maintain a cache of decompiled annotations
- Your brain has to take into account behavior that it decompiled from annotations
3/4
As a result, you become slower. Also, you may make an error during decompilation, which makes you even slower.
— Anton Nizhegorodov ๐บ๐ฆ (@mintobit) December 25, 2022
Reasons "delombock" feature exists:
- aid your brain to decompile annotations
- check that you made no errors during decompilation
4/4