| Why do we still embed natural language descriptions of source code (i.e., the reason why a line of code was written) within the source code to the exclusion of intrinsically linked separate documents? http://i.stack.imgur.com/JlUiE.png The potential advantages include: - More source code and more documentation on the screen(s) at once - Ability to edit documentation independently of source code (regardless of language?) - Write documentation and source code in parallel without merge conflicts - Real-time hyperlinked documentation with superior text formatting - Quasi-real-time machine translation into different natural languages - Every line of code can be clearly linked to a task, business requirement, etc. - Documentation could automatically timestamp when each line of code was written (metrics) - Dynamic inclusion of architecture diagrams, images to explain relations, call-graph hierarchies, etc. - Single-source documentation (e.g., tag code snippets for user inclusion in manual[s]). |
There have been countless proposals over the years for some kind of richer file format for representing code and they have all been busts because so much of our tooling, assumptions, interoperability and culture is centered on flat text code that it's proven impossible thus far to switch.