This post originated from an RSS feed registered with Java Buzz
by dion.
Original Post: Lexical scoping and Groovy closures
Feed Title: techno.blog(Dion)
Feed URL: http://feeds.feedburner.com/dion
Feed Description: blogging about life the universe and everything tech
Brian talks about closures and anonymous functions, and how closures are different in various ways, one being their lexical nature.
Lexical nature is very natural to certain programmers. For example, it was drilled into my brain when Perl had both a local and my semantic which differed.
Brian also goes on to compare the implementation differences with Ruby, and how a block is a special piece which get optionally get tagged on to a method call (and called via yeild), whereas in Groovy, a closure is just a Closure which can be passed into a method.
I love the power of closures, and hope they continue to be a core part of the Groovy language.