September 14, 2016
Making DSLs in groovy has changed a lot since Groovy 1.0. Back then it was all about what you could do dynamically: implementing propertyMissing and methodMissing, adding operator overloading, using named parameters, and leaving off semi-colons. All of those are still valid groovy, but Groovy has added a lot of features to make DSLs safer, faster, and easier to use. These are features like the @DelegatesTo annotation, script base classes, type checking extensions, extension modules, and the old standby, closure delegation.
We'll also talk about what makes a good DSL and when you want to implement one.