Groovy as a DSL

Posted by Warner Onstine on December 09, 2006

Guillame Laforge (one of the Groovy programmers) posted his thoughts on using Groovy as a DSL.

With the help of closures, methods, operator overloading, adding
properties & methods to classes, with named parameters and so on, you
can quickly come up with a language of your own, a DSL, targeted at
the subject you’re dealing with.

This was in response to an article that ran on Artima “Creating DSLs with Ruby”, of which most of the examples could be easily modified to Groovy code.

The Groovy team has created a page, “Writing Domain-Specific Languages”, to showcase some of the examples of using Groovy as a DSL, which I will probably be committing more to as the Chama project continues.

Share and Enjoy:
  • Print
  • Digg
  • Reddit
  • del.icio.us
  • Twitter
  • Facebook
  • Google Bookmarks
  • DZone
Related Posts:
Trackbacks

Trackbacks are closed.

blog comments powered by Disqus

Easy AdSense by Unreal