Groovy has many features that make it great for writing DSLs (Domain Specific Languages ):
Closures with delegates.
Parentheses and dots (.) are optional.
Ability to add methods to standard classes using Category and Mixin transformations.
The ability to override many operators (plus, minus, etc.).
The methodMissing and propertyMissing methods.
Domain Specific Languages can be useful for many purposes, such as allowing domain experts to read and write code, or to clarify the meaning of business logic. They allow business experts to read or write code without having to be programming experts.
Within Groovy you can take a block ...