Behind the season on Google UI Design MobTaxi: Getting a taxi to you quicker than ever
Jan 16

Lexical scoping and Groovy closures

Tech Add comments

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.

Comments are closed.