The Artima Developer Community
Sponsored Link

Heron-Centric: Ruminations of a Language Designer
Programmers Shouldn't Touch the Source
by Christopher Diggins
October 21, 2005
More and more programmers and researchers have been suggesting heresies along the lines of "programmers should only work with a view of source code, not the source itself".


Greg Wilson recently inspired me to think deeply about the issue of programmers only working with an abstraction of source code with his article Extensible Programming Systems for the 21st Century

Traditionally programmers work with source code of a language directly within a text editor. In most language there are numerous automated tools to help with writing and viewing the source, but in the end the programmer still works directly on the source code.

An idea that I have heard more than once is that an IDE should only present a specific view of the source code, while the real source is hidden behind the scenes in a more general format, like XML. If a source file was really an XML file at its base, and rarely directly edited by a programmer, it could have many advantages.

One of many advantages is that history tracking could be embedded in the XML source, without being in the fact of programmers all the time. When I first look at source code, I like to see the history of revisions, who did what when or why. If this is embedded in the source code as comments, I often strip it so that the code is easier for me to work with, and I know I am not the only one. If the editor only presents me with a view of the source it could be a simple matter of checking a property option to turn history viewing on or off.

Given the following program:

program answer {
  _main() {
    // the question of life, the universe and everything
    x = 15 + 3 * 9;
    // the answer to life, the universe and everything
Here is an example of how an XML source-code might look:
<program name="answer">
  <function name="_main">
        <author>Christoper Diggins</author>
        <licence>Public Domain</licence>
      <raw>x = 15 + 3 * 9</raw>
        the question of life, the universe and everything
        the answer to life, the universe and everything
I think that by storing source as XML, it could give a rebirth to theroetically good ideas like literate programming, which tend to be ignored in practice.

There are a lot of possibilities with using XML source representation. What are your ideas on things you would like stored with the source code that you don't want to always have to look at?

Talk Back!

Have an opinion? Readers have already posted 83 comments about this weblog entry. Why not add yours?

RSS Feed

If you'd like to be notified whenever Christopher Diggins adds a new entry to his weblog, subscribe to his RSS feed.

About the Blogger

Christopher Diggins is a software developer and freelance writer. Christopher loves programming, but is eternally frustrated by the shortcomings of modern programming languages. As would any reasonable person in his shoes, he decided to quit his day job to write his own ( ). Christopher is the co-author of the C++ Cookbook from O'Reilly. Christopher can be reached through his home page at

This weblog entry is Copyright © 2005 Christopher Diggins. All rights reserved.

Sponsored Links


Copyright © 1996-2019 Artima, Inc. All Rights Reserved. - Privacy Policy - Terms of Use