<br><br><div><span class="gmail_quote">On 11/6/07, <b class="gmail_sendername">Matthias Felleisen</b> <<a href="mailto:matthias@ccs.neu.edu">matthias@ccs.neu.edu</a>> wrote:</span><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
<br>On Nov 6, 2007, at 9:26 AM, Joel J. Adamson wrote:<br><br>><br>>> The closure is a data representation that is just a struct with two<br>>> fields:<br>>><br>>> -- one field that points to the environment of the function
<br>>> definition<br>>> -- another field that points to the code of the function definition<br>><br>> How concrete are we talkin' here? Are you saying the MzScheme<br>> interpreter builds a struct
<br><br>Yes.<br><br>> in the sense that I could manipulate it<br>> with struct functions (if I knew what it was called)?<br><br>You do have two operations in your language (Scheme) on closures:<br> [1] construction aka lambda (the true syntax of function defs)
<br> [2] application (that is, function application)<br><br>Your language does not give you access to the fields of the struct<br>otherwise.<br><br>> Are we starting to get at the "What's so great about Lisp?" here?
<br><br>It's the same for all rationally constructed interpreters, VMs, and<br>compilers.</blockquote><div><br>Sorry to butt in, but seeing that Joel is a biostatistician, I should mention that R has closures. (Rationally constructed is not the first adjective that springs to mind when I think of R).
<br>They have the canonical account implementation in the scoping demo, and you can find other examples in the code.<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;">
>> Time to read HtDP and PLAI now. -- Matthias<br>><br>> I read the first chapter of PLAI last night, and I'm really enjoying<br>> it. I skimmed through much of HtDP, and found plenty of good<br>> conceptual angles in it. Perhaps I'll go back and read some of the
<br>> later chapters. And you'll be happy to know I'm reading through the<br>> Little Schemer for the second time.<br><br>All of these are good books. HtDP is TLS/TLL for people who like<br>words. Or I finally figured out how to respond to Dan :-)
<br><br>> Thanks for all your help --- this list is fantastic,<br><br>You're welcome.<br><br>_________________________________________________<br> For list-related administrative tasks:<br> <a href="http://list.cs.brown.edu/mailman/listinfo/plt-scheme">
http://list.cs.brown.edu/mailman/listinfo/plt-scheme</a><br></blockquote></div><br>