I came across this article via Slashdot, which seems to be an abridge of an article that I’d already seen via lambda the ultimate.
The idea of extensible programming languages is interesting one but not a particularly a new one and nor do I think xml is the right tool for solving these problems.
XML as a programming language
XML is a good way of representing data, especially if the data needs to be passed between systems or serialised for storage. This is because there are well established API for processing xml so you don’t need rewrite a parser for each data format. It is also more human readable than some other formats.
But just because it is easier to read than some other data formats doesn’t mean it is particularly good for expressing programs, in fact expressing things that most people have come to expect from programming languages such as assignments or label associations, in a way that people have come to expect, is pretty difficult because of the tag based nature of the language. I also have some practical experience of using xml based languages from my programming in WIX and, well, they just look plain ugly to me. So for the consumers of xml things are two great.
The only advantage xml based languages to the extenders of XML based languages is that the abstract syntax tree code be exposed to them thought the DOM interface. But is this really an advantage? Would it be that hard to come up this a better API for exposing the AST? Give that large number of ways to represent an AST (the .NET framework has two API build in to it that do a very similar job, that is, CodeDom and Reflection) I think answer is yes.
The idea of programming language extensibility
Even if you discount C text marcos as not a very good way to extend a languages functionality, the idea of programming language extensibility has still been around for a while. It is used in a lot in functional programming a lot, a common pattern in functional programming is to design a domain specific language (or little language) to describe a problem then use this domain specific language to solve the problem.
Extensible programming languages are already here
I’ve been looking at language called Nemerle as part of a wider study on the .NET framework. Put simply Nemerle’s big idea is to expose the compilers AST to the programmer so that they can create Turing complete macros for the language. It’s a powerful idea, concepts that are usally hard code into the compiler, like a for loop, are implement as macros in nemerle. It’s still at the research stage so its difficult to call how well if works in practice, but worth taking a look if you are interested in programming language extensibility.