Twenty minutes ago I was throwing up my hands in despair at the C# code being generated by ANTLR and, turning to my blogreader, saw that Microsoft has released the documentation for their DSL (Domain-Specific Language) tools. Boy, is that a frustrating set of Web pages.
I'm all for revisiting the assumptions about language design and implementation. Perhaps it is the case that Microsoft's DSL tools make perfect sense to a person with a blank slate of expectations. But, for a person who's been spending time reviewing the latest version of The Dragon Book and comparing a bunch of compiler construction tools, Microsoft's DSL documentation seems just impenetrable.
Microsoft's approach emphasizes the use of a Visio-like design surface to create some form of directed-acyclic graph. I think the result is a visualization of the grammar of the target language. But the documentation uses a vocabulary different than standard "compiler 101" talk of tokens and lexemes and so forth, so I'm not sure.What the heck is a "relationship swimlane" and what does it have to do with language design and implementation? Is this vocabulary difference gratuitous or necessary?
The button-pushing walkthroughs are too mechanical for understanding. For instance: "Step 7. On the Define New Model File Type page, under What extension should model files use?, type ftree, and click Next." Directing attention to this kind of trivia is counter-productive.
Developing a four-function calculator is a cliche of compiler construction and I applaud teaching newcomers with something different. But it does have lots of advantages: the syntax and semantics are minimal and, if nothing else, it could help map Microsoft's vocabulary into something more familiar. Even if Microsoft intends these tools to be used by a broader audience than traditional lex/yacc users (and I hope they do), there needs to be some outreach to us old-timers, who are, if nothing else, the one's who are most likely to advocate the power of DSLs.