In this post on his personal blog, Daniel Fedorin describes the usage of the X macros pattern in Chapel’s compiler.