Why are flat text files state of the art for representing source code?
Of course, the preprocessor and compiler need to see a flat representation of the file, but it is easy to create.
It seems to me that some form of XML or binary data can represent a lot of ideas that are very difficult to track, otherwise.
For example, you can embed UML diagrams directly in your code. They can be generated semi-automatically and annotated by developers to highlight important design aspects. Interaction diagrams in particular. Hell, embedding any custom drawing can make things clearer.
Another idea is to embed comments from code reviews directly into the code.
There may be all sorts of tools to facilitate the union of several branches.
What I'm passionate about is not just tracking code coverage, but also viewing parts of the code covered by the automated test. The hard part keeps track of this code, even when the source is changed. For example, moving a function from one file to another, etc. This can be done using a GUID, but they are pretty intrusive to embed directly in a text file. In a rich file format, they can be automatic and unobtrusive.
So, why is there no IDE (as far as I know, one way or another) that allows you to work with code this way?
EDIT: October 7, 2009.
Most of you have very heavily hung the word "binary" in my question. I clean it. Picture XML, very minimally marking your code. Before passing it to ordinary preprocessors or the compiler, you remove all the XML markup and pass only the source code. In this form, you can still do all the normal things in the file: diff, merge, edit, work in a simple and minimal editor, load them into thousands of tools. Yes, diff, merge and edit, directly with minimal XML markup, are a bit more complicated. But I think the value can be huge.
If there was an IDE that respected all XML, you could add much more than what we can do today.
For example, your DOxygen comments may indeed look like the final output of DOxygen.
When someone wanted to do a code review, such as Code Collaborator, they could tag the source code in place.
XML can even be hidden behind comments.
// <comment author="mcruikshank" date="2009-10-07"> // Please refactor to Delegate. // </comment>
And if you want to use vi or emacs, you can just skip the comments.
If I want to use a modern editor, I see this in about a dozen different useful ways.
So this is my rough idea. These are not the “building blocks” of the images that you drag onto the screen ... I'm not that nut. :)