in reply to
Re: Re (tilly) 2: Why Closures?
in thread Why Closures?
As Tom Christiansen says, You can solve any programming problem with an extra level of indirection, except the problem of too many levels of indirection.
A closure is a level of indirection. "I will take some action" but the action to take is defined elsewhere. When you start to layer levels of indirection, it becomes critical to know what each layer is supposed to do, and that each layer does its job absolutely correctly. This
is true no matter what the layers of indirection are.
However with closures it is easy to produce an astonishing number of layers of indirection in very little code. When you write a recursive function that generates closures out of closures, it basically has to work perfectly or it will do something totally bizarre...
Caveat hacker. :-)