Comments should be removed from the source file and overlayed as tooltips like in Adobe
Anything in a source file except code is noise. To remove the noise of comments Visual Studio can highlight the line of code that comment is on or beside and show it only when the user hovers over it instead of showing it inline in the text. Basically the same way the text readers do it.
Show comments in a side bar with lines pointing to lines they belong to.
If this gets implemented, I sure hope it'll be optional, and non-default setting.
Knowing me, knowing you, a-ha commented
@Anonymous I cannot agree with that. When I read code I read comments with it as something natural, and actually helpful.
Agree that there should be option to hide show comments but that's bit different to what you're saying.
Eric, nobody is saying the comments are not of value. That's why this is a suggestion to simply display the comments in a manner which is unobtrusive.
That sounds like "well-documented, easy to maintain 6 months from now when we give it to the intern" code to me.
If you've ever gone down the path of creating XML comments for every public method, property and so on... or turned on Stylecop and accepted it's guidance to also create these for every private method and private member variable. Quickly your class has 5 lines of comments for every line of code.
So yes, comments become noise.
"Anything in a source file except code is noise"
Seriously? Comments are the single most important thing you can do to make code more readable and maintainable. Hiding them is a horrible idea.
Can't agree with the "anything in a source file except code is noise" assertion. Guess it comes down to a matter of style/taste. I suppose if this was an option that could be switched-off so the comments are visible as written, it would be ok.
Peter Jones commented
I find a lot of value in having comments in-line to break up a large chunk of strange code - it makes it much more visual obvious where methods start and end if you can see the green text wizz past while scrolling. Of course, there may be better ways to achieve the same experience.
Also you can already use #regions to hide and organise stuff.
Jon Davis commented
Would be a useful extension if one doesn't already exist. I don't see it necessary as part of the prebuilt VS.
The configurator commented
I definitely agree, but like Dave Sussman said - only for XML comments.
Dave Sussman commented
This would be really useful for XML comments, which I like for IntelliSense help, but hate because of the noise.
Andrew Olson commented
I agree with irperez; this should be an option.
I'm not crazy about this idea. I'd rather this be an option rather than the rule