tags:

views:

248

answers:

6

If you have used any decent java or .net IDE you can see the abundance of features that they provide that either do not exist in c/c++ IDEs or exist in a much more limited form.

I am thinking about features like:

  • Code Completion
  • Syntax Errors (and compilation errors with no need to compile)
  • Refactoring
  • Debugging (the amount of information that the debugger can show you about objects)
  • Code exploration and analysis (viewing type hierarchies, who calls this function etc...)

What is the main feature of managed languages that enables them to provide this (most would say) superior support in tooling?

+2  A: 

The difficulty of parsing C++ notwithstanding, I think your premise is overly broad and it's not necessarily an issue of managed vs. unmanaged.

Visual Studio, for example, has code completion, edit-and-continue (for 32-bit builds), syntax checking (as of the upcoming 2010 release), extensive debugging capabilities, and code exploration functionality for native C++ projects.

James McNellis
+10  A: 

C++ is an extremely difficult language to parse. For the parsers that do successfully process it (compilers), they are way too slow and not flexible enough to support IDE-style code support. Unlike in a compiler, in an IDE, the parser has to be very fast and be able to process syntactically incorrect code. Until now, no one's taken the time to do it because the people with skills required to do so are focused purely on actual compilers.

Visual Studio 2010 has a revamped C++ IntelliSense engine. It took them many, many years to get it done but its massively improved.

280Z28
"Intellisense" is the most annoying misfeature in any text editor. It pops up bloody dialogue boxes over my code while I'm trying to write it. Real programmers can find the declaration of the function they are calling, and read the documentation.
alex tingle
@alex: regarding myself a real (C++) programmer, I often find myself cursing when trying to manually locate the declaration of a particular function.
xtofl
As to vs2010 they brought in an external parser just for the IDE. As to complexity, include files, macros and template objects all have to be taken into account too
Harald Scheirich
@alex: You have either 1) never worked on a codebase with 1M lines or 2) have a magical ability to remember where everything is in a haphazardly organized 10000 source files. Either is fine, but for me I don't have such magical ability so the IDE is rather useful.
280Z28
grep is your friend. If you just call functions without knowing more about them than IntellSense tells you, then you are just making your 1M line program worse, not better.
alex tingle
+4  A: 

Languages like C and C++ make it harder to do completion and syntax correction because the syntaxes are more complicated than (say) Java. For example, the preprocessor makes things a lot harder.

Refactoring is harder because the C/C++'s weaker type systems make it harder to know if a refactoring would preserve the meaning of the original code.

Debugging is harder because C/C++'s weaker type systems mean that it is harder to know what the "real" types of runtime values actually are.

Stephen C
+4  A: 

I recently laughed at the c/c++ coders still using vim, till they challenged me to find an IDE that cleanly handles conditional compiling in a large project and links to the right instance of a multiply-defined conditionally compiled method. None came upto the challenge.

Moral: Keep your design clean, vim is your IDE.

whatnick
hm.... seems I need to stop using vim as a mere editor, then.
xtofl
A: 

IDEs are just crutches for programmers who don't know their craft. Get yourself a good text editor and learn to read compiler error messages.

alex tingle
C'mon that is just a useless remark. Every tool has it's purpose, if you want to stick with your text editor good for you, but a lot of the IDE's feature move our craft (yes craft) one step up from just typing code
Harald Scheirich
It's OK to use a text editor...but I would rather use an IDE - it makes me much more productive.
Thomas Owens
You are welcome to use an IDE if you want, but I guarantee that it won't make you a better (or more productive) programmer. Take Intellisense - you think it makes you more productive because it means you don't have to go and find a function declaration or read the documentation. I contend that, in the long run, reading the documentation and knowing the function declarations will make you even more productive.
alex tingle
why don't you use assembler then? C and C++ are just crutches for those who don't know their craft.
tulskiy
MSalters
MSalters: Get off my lawn!
alex tingle
A: 

If you want open source and cross platform, the NetBeans C/C++ plugin has most, if not all, of what you desire in a C/C++ IDE.

Thomas Owens