Saturday 29th March, 2014
10:00am to 1:00pm
The Groovy language provides a wide scope of metaprogramming capabilities, making it a “very dynamic” language. One of those aspects, AST transformations, is about changing the internal representation of a program before it is actually executed. For example, using the @Log annotation, you can transparently add a logger field into a class. Using @ToString, you can have the compiler generate the toString method for you.
All those AST transformations are very powerful, but require a deeper knowledge of the compiler internals. In this workshop, we will introduce you from the beginning to AST transformations, describe the abstract syntax tree, setup a development environment and eventually, write some AST transformations so that you can contribute some in turn. The session will also show you some common traps, such as variable scoping, generics and compatibility with other AST transforms.
Software Engineer @Gradle, Inc. Conference speaker. Introvert (http://www.carlkingdom.com/10-myths-about-introverts). Wrote the static compiler for #groovylang.
Sign in to add slides, notes or videos to this session