This is an interesting question, because aside from whether it is actually a good idea right now, it pushes the boundaries of the way we work.
All of the reasons for not mixing rich text and code do not address of the question of whether this would help anyone - whether there is also an up-side that compensates for the disadvantages. Perhaps we would all still be using gopher if no-one had asked this kind of question and invented the web.
As for source code comments, some rich-text features would be more useful than others:
- hyperlinks would certainly be useful since code documentation frequently needs to refer to documentation that lives outside the code, as well as links to documentation elsewhere in the code to avoid duplication
- images would be useful because there are many cases when the most sensible code documentation is a diagram - some people do use UML, for example
- lists would be useful - this list, for example, is easier to read in its rich text version (i.e. the HTML) than the Markdown source
- font-formatting is less important - bold and italics are occasionally useful for emphasis and text is more readable if code fragments (e.g. a
variableName
) are easier to read when formatted differently; different colours make little sense
- headings would not usually be useful, because if a code comment is so long that it needs headings to introduce structure, it should probably be outside the code.
Ironically, it is harder to argue against rich text comments in code, when you are posting rich text comments on Stack Overflow - you have to resort to the argument that rich text is okay 'sometimes'.
Even in short comments here, rich text turns out to be useful, and the Markdown source remains sensible when you do not see the formatted version. So perhaps a good compromise would be for an IDE to render Markdown comment blocks as rich text, and show the Markdown source as soon as the cursor position is in the comment block.