Hacker News new | past | comments | ask | show | jobs | submit login

Lombok fixes most of the getter/setter issues. It is also supported in IntelliJ



However bad the Java situation is, Lombok as a solution is worse. It uses unsupported and undocumented APIs of the compiler, it autogenerates code that is in some cases flat wrong (like the infamous enum @ToString), and it does this through a mechanism of the language specifically designed for pure metadata - code that compiles with annotations should not cease compiling without them. And, because of the way it does what it does, IDEs must have explicit Lombok support built into them. It is, effectively, a different language that's a superset of Java; at that point, you may as well actually use a superset of Java like Groovy, and then you don't have tools prone to breaking.


I’m not a huge fan of libraries that use attributes as a hook for code generation in C# either, though thankfully there’s less need for something like Lombok.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: