This week's book giveaway is in the General Computing forum. We're giving away four copies of Arduino in Action and have Martin Evans, Joshua Noble, and Jordan Hochenbaum on-line! See this thread for details.
Originally posted by Chris Patti: Aha! I finally get it! So an Expando is just a map that lets you call methods on it which are actually the map's keys, and the values are a closure that does whatever you want it to do.
Just to make sure you caught it, a map in Groovy lets you use keys as methods (syntactically) too. See the doSomething key in my example, which worked for both map and Expando.
The primary difference was for toString, hashCode, and equals - the map won't let you override them but Expando does.