in reply to Real life uses for closures.
GUI wise,could use a closure for events + state. For example click a button which fires an event but also encapsulates state too, for example keeping track of how many times that button has been clicked, etc
Could also be used for filtering data and since the question is language agnostic take a loot at Jon Skeet's The Beauty of Closures
|
---|
Replies are listed 'Best First'. | |
---|---|
Re^2: Real life uses for closures.
by BrowserUk (Patriarch) on Feb 12, 2013 at 22:46 UTC | |
by runrig (Abbot) on Feb 13, 2013 at 00:36 UTC |
In Section
Seekers of Perl Wisdom