Skip to main content

Lombok needs NetBeans fans (and Idea too...)

Posted by fabriziogiudici on July 29, 2009 at 11:12 PM PDT

Project Lombok has been talked about at the JavaPosse mailing list. In short, it's a tool that hooks into the compiler for generating boilerplate code, driven by annotations, for things such as JavaBean bound properties. For more information, have a look at the project website.

Now, I'm a big fan of this kind of tools. I think that Java-the-language is mature and has reached the limit in the feature / complexity ratio; that is, any major improvement will ineluctably make it too complex, towards a direction that C++ has experienced fifteen years ago. Any new idea go to new languages, please. But tools such as Lombok could bring a lot of benefits into the language, just relying on the annotation support.

One of the most recurrent criticism about this approach is for poor integration with the IDE - e.g. auto-completion not working and such. For this reason, Lombok has got a plugin-or-such that hooks into Eclipse too. Of course, specific work is needed for every IDE, and the Lombok guys are also working on support for NetBeans, but none of them is a NetBeans guy, so they'd like to get some help. It's a thing that could fit well with the recent NetDEV initiative.

BTW, they'd like to support IDEA too, but being closed source, they don't know what to do. Roman, if you're listening and you think it's a good idea... do you think that something could be done?


BTW, I don't see how an implementation detail of the compiler (one vs two processors) makes a language simpler or more complex. "Simple" to me means how it is easy to learn and predictable.

The language is still the same. And if you don't want those features,you don't activat them. I personally wouldn't use Lombok for all the things its authors are putting into it, but only for a subset.

How is a language with dozens of new features implemented as two sequentially applied processors (Lombok and javac) simpler that a language with dozens of new features specified by the language specification and implemented as one processor (javac)? It defies logic.

These are controversial topics. In any case, you're not trading the complexity of closures / etc with generics; generics are already here and they IMO brought java to the complexity threshold. Now, whatever you add, with the exception of very simple stuff, will pass that threshold.

Fabrizio, Let me disagree with you. Java-the-language has not reached the limit in the feature / complexity ratio. Compared to the implementation of generecs such concepts as properties or lets say closures are relatively simple. The real reason becuase such projects as Lombok and appear is because Sun as the "master" java don't want to add properties or closures to java language. That's sad...

Aren't annotations supposed to provide some kind of meta-information for the runtime but not recommended to modify/alter compiled code. How am I, poor reader of the code, supposed to know what the heck is Lombok doing behind the scenes or how can I debug it? I had a brief look at the Lombok website and its docs, I don't think this is a proper wokaround for Java's missing "features".