note
BrowserUk
<blockquote><i></i></blockquote>
<p>I've been reading a lot about constructing interpreters and VMs lately, and one thing that seems common to most new ones is the seemingly obligatory inclusion of closures; and the almost equally obligatory tales of woe, sleepless nights and extreme programming hardship that are required in order to implement them in an efficient and elegant manner.
<p>Then the thought that formed in my mind was that whilst I am [http://perlmonks.com/index.pl?abspart=1;displaytype=displaycode;node_id=405888;part=1|quite happy to make extensive use of them], I was also quite happily solving my programming problems in languages that don't support them for 15+ years before I became acquainted with them.
<p>So then the questions that came to me were: a) how much use do people make of them in Perl? b) How many of those uses are actually 'killer applications' of closures, rather than trivial or convenient uses of up-values in anonymous subroutines that could just as easily be done using some other mechanism that doesn't impose such demands upon the VM?
<P>One of the 'killer applications' of closures often cited in FP circles, is their links to continuation passing. But continuation passing is just one method of solving a problem that can be solved in various other ways. And most of those other ways seem to impose far less runtime burdens than CP whilst achieving the same goals.
<p>Hence my very open question to try and get a feel for what people do with closures in real-world code.
<div class="pmsig"><div class="pmsig-171588">
<hr />
<font size=1 >
<div>With the rise and rise of 'Social' network sites: 'Computers are making people easier to use everyday'</div>
<div>Examine what is said, not who speaks -- Silence betokens consent -- Love the truth but pardon error.</div>
<div>"Science is about questioning the status quo. Questioning authority". </div>
<div>In the absence of evidence, opinion is indistinguishable from prejudice.
</div>
</font>
</div></div>
1018281
1018579