Few days ago I started to write some Java code (I'm using the Choco constraint solver) and tried to use the Netbeans 5.5 IDE (and the version 6 should be out soon). I have to say that I was pleasantly surprised. It is simpler to use than Eclipse, and feels faster. Now I have started to use it for C and C++ development and I'm wondering like... WHY haven't I given it a chance earlier :)


Anonymous said...

I don't doubt that NetBeans beats the traditional Unix development environment (vi or emacs + the shell, make, and other assorted utilities) when it comes to editing Java, but I wonder how it fares with C and C++. In theory most of the features found in Java IDE's could be implemented for C++. A built-in compiler could examine the source code as it is typed, underlining errors and warnings and producing object code on the fly, without waiting for lengthy compilation. You could get explicit warnings when using obsolete API's (think "gets") or when you forget to include headers mandated by POSIX (or Win32 or other standards, de jure or otherwise, that apply to your target platform). Handling #include directives could be smarter; the IDE could know which system functions are in which includes, and could intuit the necessary includes upon user request. Refactoring could work in C++ exactly like it does in Java.

But I've seen none of that in the Java IDE's adapted to C++. In fact, attempts to use Eclipse to edit C++ source code have proven to be an utter disaster. It took hours and several gigabytes of RAM to build a completion index for a fairly modest code base (~50k lines), whose only failing was the use of the Boost library. Almost none of the rich refactoring features worked for C++. The IDE was confused by even the fairly simple use of macros. It was of no help at all with management of include directives. I didn't find a way for it to compile code on-the-fly and mark compilation errors. It felt like a slow and feature-poor port of a Java IDE that it was.

I hope your experiences with NetBeans will be better.

zvrba said...

Oh, I had the same experience with Eclipse as you :-)

While NetBeans does not offer as rich set of features for C++ as it does for Java, it still fares fairly well. It tackles projects including boost well (no performance/memory problems), class view also works, and even autocompletion works (most of the time :)). Thing like refactoring or on-the-fly compilation still don't work, but.. what works is still much better than emacs/vim + etc. set of tools.