On 7/10/07, <b class="gmail_sendername">Ken Manheimer</b> <<a href="mailto:ken.manheimer@gmail.com">ken.manheimer@gmail.com</a>> wrote:<div><span class="gmail_quote"></span><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
<span class="q"></span><br><div><div>the elementary
structures by which computations can be stored for later continuation
are called just that - <span style="font-style: italic;">continuations</span>. <span style="font-style: italic;">closures</span>, on the other hand, are an organization of program state that can be associated with an object - typically to implement static scoping, as was done for python functions and methods around, someone said, python
2.1. i seem to recall that ruby manifests blocks as first class objects, and associates closures with them, as well.</div></div></blockquote><div><br>Ugg! Hey Curt, we're now twins! ;-)<br><br>Yep, I most definitely confused things here. Thanks for the correction!
<br></div><br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;"><div><div>(continuations <span style="font-style: italic;">are</span> interesting, but mostly in the abstract - they're not generally of interest for direct use by programmers. they're the mother of all
control flow structures - all the others can be expressed and built
using them, but they're very low-level - you would hardly ever want to program with them directly. stackless python uses (used?) them
as a key means of building the other flow control structures without
using the machine (c, in that case) stack, and they enable economies for massive parallelism that most of us don't need (and couldn't handle without major attention). generators provide the means to express much of what programmers practically want in this vein, and the
recent refinements to enable use of generators as coroutines (<a href="http://www.python.org/dev/peps/pep-0342/" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)">pep 342</a>) covers most of the rest. how these structures map to parallelism are up to the language implementation. guido has been actively disinterested in incorporating continuations to the python definition, for various reasons, and i don't expect that to change.)
</div></div></blockquote><div><br>Yep. this all makes sense.<br></div><br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;"><div><div>i couldn't resist this clarification, and hope i haven't mistaken what you were saying (or, what i'm saying:-).
</div></div></blockquote><div><br>Nope, you are right on the money. I said closures, but meant continuations. Thanks for correcting me!<br></div><br></div>-- <br>/M:D<br><br>M. David Peterson<br><a href="http://mdavid.name">
http://mdavid.name</a> | <a href="http://www.oreillynet.com/pub/au/2354">http://www.oreillynet.com/pub/au/2354</a> | <a href="http://dev.aol.com/blog/3155">http://dev.aol.com/blog/3155</a>