Extensible Programming for the 21st Century
March 24, 2005

For a long time I’ve been wanting to develop an authoring environment which stores code as some sort of structured database, rather than just a bunch of text files.

Imagine if the program is stored as XML, for example. Perhaps not optimal from an implementation point of view, but it’s a good way to visualise what I’m on about.

Obviously it’s easy to extract the raw source code from the XML if that’s what you want/need to do.

But it’s also possible to extract the actual relationships between program elements, as long as you have some basic knowledge of the object model being used to represent a program.

Suddenly it’s a lot easier to analyse the code. It’s also easier to transform it, so refactoring becomes much simpler.

If you have another language with a compatible representation, you can even automatically translate the code.

Finally, and perhaps best of all, you can add arbitrary meta-data to your code. This could be textual documentation (much more sensible that trying to embed documentation into comments a la JavaDoc), diagrams, optimisation hints, test data for unit tests, whatever.

Anyway, what triggered this particular post was that I came across a reference to an article on the Dylan list, which touches on some of these ideas.

« SmartSlab Behind the Red Shed, with Jonathan 'The Wolf' Rentzsch »
Got a comment on this post? Let me know at @samdeane@mastodon.org.uk.