Perhaps someone who knows this material can advise us about something. I just looked through the linked ToC and am surprised that nearly everything is about DSL internals. Example:<p><i>Express statement sub-elements of a function call by putting them into a closure in an argument.</i><p>This is all easy stuff! The hard part is figuring out what a DSL should <i>be</i>. For all the hype about them, there are precious few examples of good ones. The successful ones are nearly always purely technical things like regular expressions that, while marvelous, do not even attempt to deliver on the promise of accessibility to domain experts. By far the majority are junk because they do a poor job of modeling the domain. This has little to do with closures or even parsers. To focus on such details is to take the easy way out (though I suppose it might sell more books to programmers infatuated with the idea of DSLs, who are more interested in, say, syntax-directed translation than in insurance or crop yields).<p>When asked what they thought of Elvis Costello, the Sex Pistols replied, "He wears glasses without any actual glass in them." Surely Martin Fowler has not written a Domain Specific Language book without any actual Domain in it?
I noticed another thing about this book. The index has a dozen or so references to Lisp, but no mention of Forth. This is unfortunate. I bet there are more true DSLs in production in Forth systems than Lisp ones. They're scattered throughout the industrial world. Real people, i.e. with no knowledge of computing who are simply at work in their domain, use them to do things like calibrate lathes. Since the main thing we need if DSLs are to become more than design patterns squared (a technical scourge making things unnecessarily complicated for years to come) are <i>real working examples</i>, it's bad to ignore the richest source thereof. Of course this is one of the hard things about writing about software; where are you going to find such examples? On the other hand, I don't think people try very hard.<p>The DSL philosophy runs as deep in Forth as it does in Lisp. Consider this passage from <i>Thinking Forth</i>:<p>"Programming languages designed especially for particular applications such as robotics, inventory control, statistics, etc., are known as 'application-oriented languages'. FORTH is a programming environment for <i>creating</i> application-oriented languages. (That last sentence may be the most succinct description of FORTH that you'll find.) In fact, you shouldn't write any serious application in FORTH; as a language it's simply not powerful enough. What you <i>should</i> do is write your own languages in FORTH (lexicons) to model your understanding of the problem, in which you can elegantly describe its solution."<p>That's from 1984. Yeah, that's right: 19 freaking 84. Has there ever been a clearer description of the idea?
Or you could just read Chapter 4 of SICP: <a href="http://mitpress.mit.edu/sicp/full-text/book/book-Z-H-25.html#%_chap_4" rel="nofollow">http://mitpress.mit.edu/sicp/full-text/book/book-Z-H-25.html...</a>, the first edition of which was published 26 years ago.
I bought this book as a "Rough Cut" a few months ago. If you want a very high-level introduction to the field of DSLs this book may be for you but don't expect to be able to do much useful after reading it. It really is just the 50,000 ft view.<p>I was disappointed because I wanted to get my hands dirty and so I got The Definitive ANTLR Reference a day or two later. While it has nothing like the breadth of Fowler's DSLs it has enough depth to be very useful.<p><a href="http://www.pragprog.com/titles/tpantlr/the-definitive-antlr-reference" rel="nofollow">http://www.pragprog.com/titles/tpantlr/the-definitive-antlr-...</a>
on amazon:
<a href="http://www.amazon.com/Domain-Specific-Languages-Addison-Wesley-Signature-Martin/dp/0321712943/ref=sr_1_1?ie=UTF8&s=books&qid=1286241603&sr=8-1" rel="nofollow">http://www.amazon.com/Domain-Specific-Languages-Addison-Wesl...</a>
The link has changed?<p><a href="http://martinfowler.com/dslwip-gone.html" rel="nofollow">http://martinfowler.com/dslwip-gone.html</a><p>"Now that my book on Domain Specific Languages is published, I have taken down the online drafts from my web site"
Martin Fowler seems so 2008.<p>To think I believed him that TDD was a good idea... It seems so far in the past.<p>I vote MF take Zed Shaw up on his ring match offer. At least ZS has an honest job now, soaking up government-guarantee student loans while MF seems to still be rolling ignorant corporations with his "experience"...