InfoQ Homepage News Evolving Embedded Domain Specific Languages in Java

Evolving Embedded Domain Specific Languages in Java


Steve Freeman and Nat Pryce presented a paper on Evolving an Embedded Domain-Specific Language in Java at OOPSLA 2006. The paper describes the evolution of jMock from a framework to a domain specific language embedded in Java. They describe how it happened, lessons learned about EDSLs, their limits, and how Java and C# work as host languages for them.

Freeman and Pryce describe DSLs and their benefits and how EDSLs are common in lanugages with small syntaxes (Haskell, Lisp, Smalltalk) but are harder to hit into large syntax languages such as Java. They then describe the previous incarnations of jMock as it developed from, dynamock, and now jMock. They detail their lessons learned from each step on the evolutionary ladder. Then there is a detailed discussion of jMock and many of the design decisions they made.

They list some conclusions at the end, including the need to make sure a framework always works well in a modern IDE, that scaling EDSLs into complex languages may not be a good idea as the complex cases make the code harder to read, and that for the most part, it is too hard to extend conventional host languages.

Rate this Article


Hello stranger!

You need to Register an InfoQ account or or login to post comments. But there's so much more behind being registered.

Get the most out of the InfoQ experience.

Allowed html: a,b,br,blockquote,i,li,pre,u,ul,p

Community comments

Allowed html: a,b,br,blockquote,i,li,pre,u,ul,p

Allowed html: a,b,br,blockquote,i,li,pre,u,ul,p


Is your profile up-to-date? Please take a moment to review and update.

Note: If updating/changing your email, a validation request will be sent

Company name:
Company role:
Company size:
You will be sent an email to validate the new email address. This pop-up will close itself in a few moments.