问题
I can't find another topic where this has already been asked, so I'm starting one... if there is one, feel free to link it and close this.
What feature do you feel is most missing from Visual C++?
Microsoft has been adding nice features for C#/VB.NET development for the last couple versions, but C++ has felt a bit neglected. I don't have much experience with other IDE's, but there must be some advances in C++ IDE development in the last five years that people like. I'm very curious what people think are the most glaring lacking features missing from Visual C++.
Notes:
- No, I don't work for MS, I just use their stuff a lot, and want to see it get better
- This is specific to native C++ development, although I suppose C++/CLI should be fair game too
- Feel free to add multiple features as separate entries; that way people can vote up things they find the most lacking
回答1:
Refactoring.
回答2:
I seem to be one of the very few people on earth using this, but I would really love if Microsoft would implement the keywords and
, or
and not
correctly in both their compiler and the IDE – in fact, all of the ISO 646 but these three are the only ones that are really useful.
They have a lot of “good” excuses for not implementing them – not a breaking bug, not many people use them, yadda yadda yadda – but it's such a small thing and it seems so careless of them not to implement it just out of spite.
… for people who don't know what I'm talking about:
// This is valid C++
bool x = not (a and b) or c;
// … and is equivalent to this:
bool x = ! (a && b) || c;
The keywords are also defined as macros in the standards header ciso646
for compilers that don't support the above code right away but standards-compliant compilers must support this code.
回答3:
This isn't IDE related, but language related. I wish MS would support at least a few of the C99 changes. Specifically:
stdint.h
andinttypes.h
. I have my own versions so it's not a big deal for me, but MS really should have put these in a long time ago. They require absolutely no changes to the compiler.- mixed declarations/code and
inline
in C. They already have to do this for C++ why not let me do it in C? _Pragma()
. They already do something very similar (_pragma()
I think), but it's different enough that it needs#ifdef
s to work.
回答4:
If multiple expressions (separated by sequence points) exist on a single line, then allow stepping through the individual statements one at a time. Example: in a for loop, step through the initialization & comparison as two separate statements (on first pass) and the comparison and increment as two separate statements (on subsequent passes) .
Stepping through macros.
回答5:
Since we're dreaming... and you mentioned Template Meta Programming (TMP), it would be killer if there was a TMP debugger ;)
回答6:
If I declare a set of functions in a header file, with just one click all the functions should automatically be expanded into its .cpp file. Or vice versa. I am not sure if there is a macro for this already.
回答7:
Autogeneration of code, getters/setters etc, much like IntelliJ IDEA for Java has.
EDIT: And also addition of pretty much everything that's currently supplied by Visual Assist X. That thing is an absolutely necessity for working in Visual C++.
回答8:
It would be nice if Intellisense got finally fixed. My VS 2008 freezes for 10+ minutes when I RIGHT CLICK anywhere in the code window. C#/VB.NET get all the Intellisense love - not the case with C++ ....
回答9:
The Visual C++ compiler is missing support for the register keyword. It simply ignores it.
In the hotspot(s) of your application it is important to be able to direct the compiler to do the right thing.
Or as James Pratt put it:
"The REGISTER keyword is ignored. This is critical to producing fast code because the compiler does not always choose the right variables to keep in register."
The register keyword is a powerful tool that can be abused and can hurt portability, but I think it should be supported.
For some reason Microsoft will not allow us this level of control. The main argument is that the compiler is smarter than the software engineer. This is simply not true in all cases. If Metroworks had used the same argument for their C++ compiler for the PowerPC/Macintosh I would not have been able to speed up my user-facing application by a factor of 2 (from 4 seconds to 2 seconds for the main operation) just by assigning the important variables to registers, eliminating main memory accesses. This took just one hour to do, directed by disassembly of the generated code and eliminating memory accesses.
回答10:
One thing I think VC++ desperately needs:
- A step-through capability
There's a step over capability available through the undocumented NativeDE subkey (google the subkey name to read about it), which is very useful for trivial constructors/etc. However, with boost, TR1, COM abstractions, and other multi-step pass-through code becoming more common, VC++ really could use the ability to step through functions automatically in the debugger. Note that this exists for C# as an attribute already, but it's needed for native C++ IMHO, and as a documented, supported capability.
回答11:
In addition to stepping through macros, I wonder if anyone thinks that eventually the compiler will need to support a step through template expansion capability? With meta programming becoming more standard, and templates becoming more complex and compile-time evaluated, this could become an issue.
回答12:
Another thing I'd like, personally, is the class graph display like the one which is possible for .NET languages. I think it would definitely help with visualizing new code projects which you're trying to visualize.
回答13:
Thought of another thing I personally want:
The ability to break on a function by name, no matter where it is called from, or where it is defined.
It's easy enough to break on functions in your code, but often I find myself wanting to break on functions which I don't have the source code for (eg: OS API functions), and it's infeasible to track down every instance in my code and library code where the function is called. VS has the ability to break on a function, but it doesn't seem to work for functions which are not in your code.
回答14:
Being able to set the priority of the compile threads.
来源:https://stackoverflow.com/questions/198402/missing-desired-features-in-visual-c