Wandering Thoughts archives

2007-05-29

On storing source code in some non-text format

Every so often these days there is some agitation that program source code should not be stored as text but instead in some more intelligent and more abstract form, and just presented as text by editors.

This is the programming language version of the web's 'semantic markup only' movement, and it fails for the exact same reason that only a small fringe writes in purely semantic markup: the appearance of the text is important, it is not an afterthought. Programmers care not just about the meaning of their code but also how it looks, and they want other people to see it that way because that specific appearance is important to them.

(This implies that automatically reformatting source code to the viewer's preferred style is not going to pacify people.)

You can in theory store source code in an abstract representation that still exactly captures the appearance of the text, but then what is the whole mess and effort getting you?

(Plus, the other problem is that programmers hate editor lockin, and in practice that's what any such system starts with, open XML format or not; there is going to be only one editor that can easily edit the new storage format.)

This does suggest the one place where you can get away with this: situations where you already have a specific captive environment and are dictating a single style of code formatting anyways.

programming/AbstractSourceRepresentation written at 22:43:27;


Page tools: See As Normal.
Search:
Login: Password:

This dinky wiki is brought to you by the Insane Hackers Guild, Python sub-branch.