TE
TechEcho
Home24h TopNewestBestAskShowJobs
GitHubTwitter
Home

TechEcho

A tech news platform built with Next.js, providing global tech news and discussions.

GitHubTwitter

Home

HomeNewestBestAskShowJobs

Resources

HackerNews APIOriginal HackerNewsNext.js

© 2025 TechEcho. All rights reserved.

Martin Fowler's Domain-Specific Languages book is out

63 pointsby praeclarumover 14 years ago

8 comments

gruseomover 14 years ago
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?
评论 #1759187 未加载
评论 #1760450 未加载
gruseomover 14 years ago
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?
评论 #1760135 未加载
评论 #1759956 未加载
poetover 14 years ago
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.
评论 #1758941 未加载
评论 #1758669 未加载
darntonover 14 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>
评论 #1758846 未加载
tjpickover 14 years ago
on amazon: <a href="http://www.amazon.com/Domain-Specific-Languages-Addison-Wesley-Signature-Martin/dp/0321712943/ref=sr_1_1?ie=UTF8&#38;s=books&#38;qid=1286241603&#38;sr=8-1" rel="nofollow">http://www.amazon.com/Domain-Specific-Languages-Addison-Wesl...</a>
pellaover 14 years ago
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"
Tichyover 14 years ago
Needs web design
joe_the_userover 14 years ago
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"...