Visual C++ Refactoring
visualstudiogallery.msdn.microsoft.com
visualstudiogallery.msdn.microsoft.com
Perhaps there are people who take working refactorings over those that sometimes need massaging to prevent semantic and syntactic errors.
(That being said, I probably never really used that much of what Eclipse offers in refactoring apart from Extract Method, Rename and Extract Local Variable. And I do understand that refactoring for C++ code is downright hard, if not impossible in the general case.)
If the IDE got it wrong I'd revert and submit a bug report, no biggie.
I want my IDE to be stable, fast and do as much for me as possible.
I suspect from what you're saying you're using something else.
E.g. day to day i use subversion. It's possible to adopt this workflow in subversion but it definitely takes more effort on my part.
It would be very interesting to look at code as a graph database (of the https://github.com/tinkerpop/blueprints/wiki family, for instance). In a way, one could see how a functional programming language defines entities and their relationships, and how a function is just a composition of other functions to which it could be linked. But do we want to write a graph operation every time we want to make an edit or add a feature to our code? Perhaps the textual codebases we have are the most easily editable visualization of the underlying "graph."
Also I should have said, "why aren’t are codebases like modern databases".
Similar to the functionality all Java IDEs have out of the box, but in Visual Studio you need Visual Assist or ReSharper.
What kind of refactoring? What do you mean by code navigation?
Refactoring:
- Semantic renaming of any identifier consistently across the whole source code
- Transform code blocks into methods, functions
- Move code blocks across modules, classes
- Generate accessors, setters for a given instance, class variable
- Change type of a given variable consistently across all the places it is used
- ...
Code Navigation:
- Show call stack for every use of a certain method/function
- Show all descendents of a given class, interface across the code base
- Show all ascendents of a given class, interface across the code base
- Show which classes, interfaces introduce, redefine a certain method
- Show which binary provides the implementation of a given class, function
- ...
Where exactly is Visaul Studio lacking here compared to your Java IDEs? Or are you comparing apples and oranges -- C++ to Java?
No it does not.
The amount of refactoring support out of the box differs for each Visual Studio version (professional, premium, ultimate, ...).
Plus if I were to produce a comparison table, there quite a few refactorings from Java world that don't exit in Visual Studio out of the box.
As a small example, finding the usage of identifiers only provides partial information of what Java IDEs are able to. Which can search for different ways the identifier is being used, being called, as a method, being assigned to, etc.
As for plain C++, KDevelop, Eclipse CDT, Netbeans and QtCreator all provide much more refactoring support than Visual C++ ever did.
I do like Visual Studio and use it since the first 32 bits only version, Visual C++ 2.0. But I am also aware of its defects.
My employer won't pay for the listed plugins, given what is already being paid for MSDN subscriptions.
It is too old, based on C++ concepts that don't have place in a modern post C++11 world.
WTL was never an official framework.
When the going native turnaround came about, they started staffing the compiler team again, but it does take years to recover what the .NET has enjoyed in the meantime.
On the other side, the going native also seems to affect .NET side, with AOT compilation for WP8 and the new JIT/NGEN compilers being developed for the next release.
n.b. I worked on Visual Studio for four years and was the PM behind the managed wizard framework introduced in 2005 (which I've noticed is still around today).
(I understand that C++ is not the focus of the Mac ecosystem but it was a shock when I attempted to refactor some C++ and it told me that it doesn't refactor C++. I was mildly sad.)
Personally, I'd much rather use a simple tool (like sed), with reliable, deterministic results, than something that's right "99% of the time".
Sure, it tries to spot edge cases and flag them up to you, but if it's wrong some of the time, who's to say that it won't fail to spot an edge case 1% of the time too? So if it fails 1% of the time, and it fails to realise the problem in 1% of those cases, then it's introducing subtle bugs one time in every 10,000??
The very idea gives me cold shivers.
Note: if they "improve" the tool so that it's right 99.9% of the time, then they've only made the situation worse. Now the bugs only crop up one time in 1,000,000 - and now they are even more subtle.
tl;dr - a refactoring tool is 100% reliable, or useless. There's no in-between case.
>tl;dr - a refactoring tool is 100% reliable, or useless. There's no in-between case.
lol..