In a comment to my last post, Rob Harwood (from JetBrains) pointed out a great article by JetBrains Co-founder and CEO Sergey Dmitriev on Language Oriented Programming. In it he goes in to a good deal of detail about their latest product/experiment: The Meta Programming System (MPS).
The article is very interesting. It provides a high level breakdown of each part of MPS and promises many more details in the future. I think the article is a bit more complicated than it needed to be. As an example, Dmitriev shows us how to construct MPS using MPS (not exactly �Hello World�). Overall, I think he gets his points across well. Those parts requiring more detail usually promise future articles on the subject (which I am definitely looking forward to).
There were quite a few concepts that I wasn�t really expecting. The first was that the languages created in MPS will be able to easily take advantage of advanced editor features such as refactoring, code completion and syntax highlighting. This could be really powerful. A language specific to my area of business may have IDE features more powerful than many well-established languages.
I also liked that the languages can generate code for any number of general-purpose languages (Java, C#, C++, etc.), or they could generate code into another MPS language. Because of that, languages can build upon each other. My accounting language might compile down into the MPS base language (which defines common language constructs, like jstl�s core library does for JSPs). The base language knows how to compile down to a dozen general-purpose languages. In effect, my accounting language supports a dozen programming platforms for free.
I also like that these are languages rather than libraries. It allows them to offer all the features that C++ promised (model the language after your domain) without all the mess, and hopefully requiring much less discipline.
I still have questions about Domain Languages in general. One thing I wonder about, is how this will effect separation of duties if it were to take off. Assuming companies write their own languages, would some programmers write domain languages, while others use them? Could languages be reused effectively, or will every company end up with their own?
I�m still not entirely convinced that creating a domain language can be easy (I don�t know if I�ll be a believer until I try it myself). I am looking forward to reading more about it.
Labels: Programming