Wednesday, December 25, 2013

Another reason to use Netbeans instead of Eclipse

A couple of weeks ago I stumbled on a post by another Eclipse fanatic. The insect ... oups, blogger, was making fun of people using Netbeans. Well, fortunatly for him there was no comments or reply button on the page because I would have replied and my comment would have been difficult for him to handle:
You might like the chaotic and always in beta look and feel of Eclipse however the biggest problem with Eclipse is its buggy Java compiler.
Some people don't even know this but Eclipse has his own "internal" Java compiler. Netbeans on the other hand uses the JDK supplied compiler. Eclipse's compiler has one advantage over the one in the JDK and that is the granularity of the compiled elements. Eclipse will compile and "link" smaller pieces of code. In a few cases where you have to stop debugging and restart in Netbeans, Eclipse will simply recompile the small bit of modified code and keep the debugging session alive. The problem however is that the last time I looked there was still a bug in the compiler forcing us to add useless class cast in generic code. To that you might respond that it is not such a big issue. My response to this would be: well one of the benefit of generics is to remove the need for a lot of type casting in the code so for me it is important. My other response to this would be that it is not the only problem with the Eclipse Java compiler. The reason I switch to Netbeans despite Eclipse being the standard where I work is that for a while in the transition to Java 1.7 the Eclipse compiler would simply not compile my project. This was eventually fixed (a week later) but I simply could not wait a whole week without a working IDE so I switched to Netbeans. I have no problems with that because I have always preferred Netbeans to Eclipse. Aside from what I would call the objective argument (an IDE should compile the code correctly) there is of course a subjective side to my preference for Netbeans. I prefer the more static placement of the Netbeans windows and views. It is flexible enough for me and without feeling chaotic like Eclipse. Also, Netbeans was in front of Eclipse supporting the preview version of Java 1.8 and I would not want to be the guinea pig for the 1.8 internal Eclipse compiler.