<HTML><BODY style="word-wrap: break-word; -khtml-nbsp-mode: space; -khtml-line-break: after-white-space; "><BR><DIV><DIV>On Jan 23, 2007, at 5:42 PM, Carl Eastlund wrote:</DIV><BR class="Apple-interchange-newline"><BLOCKQUOTE type="cite"><P style="margin: 0.0px 0.0px 0.0px 0.0px"><FONT face="Helvetica" size="3" style="font: 12.0px Helvetica">The problem here is not that numbers and lists work differently, but</FONT></P> <P style="margin: 0.0px 0.0px 0.0px 0.0px"><FONT face="Helvetica" size="3" style="font: 12.0px Helvetica">that lists and *variables* work differently.<SPAN class="Apple-converted-space">  </SPAN>The (set! ...) form</FONT></P> <P style="margin: 0.0px 0.0px 0.0px 0.0px"><FONT face="Helvetica" size="3" style="font: 12.0px Helvetica">works on variables, not values; the set-car! form works on values.<SPAN class="Apple-converted-space">  </SPAN>It</FONT></P> <P style="margin: 0.0px 0.0px 0.0px 0.0px"><FONT face="Helvetica" size="3" style="font: 12.0px Helvetica">would be possible to implement integers that had a "set-integer!"</FONT></P> <P style="margin: 0.0px 0.0px 0.0px 0.0px"><FONT face="Helvetica" size="3" style="font: 12.0px Helvetica">procedure, so you could modify an integer as it was passed around, but</FONT></P> <P style="margin: 0.0px 0.0px 0.0px 0.0px"><FONT face="Helvetica" size="3" style="font: 12.0px Helvetica">that's not the same as set!.</FONT></P> </BLOCKQUOTE><BR></DIV><DIV>Fair enough, but my point (rather a trivial one, perhaps) was that the similarities in syntax can be confusing.</DIV><DIV><BR class="khtml-block-placeholder"></DIV><DIV>My understanding (right or wrong) is that (set! x 4) changes the binding of the nearest enclosing x to 4. At least that's how I implemented it in my evaluator.</DIV><DIV><BR class="khtml-block-placeholder"></DIV><DIV>FWIW, What I've been trying to do is experiment with evaluation and reduction strategies. Reading SICP, I was impressed by how all the various functions eval-if, eval-define, eval-sequence, etc. resembled a semantic description of the language, so I decided to rewrite the evaluators (for practice) and experiment with how I can manage code re-use (something that's proving harder than I expected). I also want to try experimenting with type systems and such. Oh, and I never did really say why I started thinking about boxes. This may sound ridiculous, but in the language I'm used to using in my "day job" it is possible to share variables between separate processes. Does that make any sort of sense in a functional context? Maybe. I have in mind a kind of memory object that receives messages from parallel processes (interleaved in some fashion)  that will result in environment updates (not the same kind of environment as the set of bindings used by an evaluator). I'm also trying to wrap my brain around how this could work with reduction semantics. I did download, and am reading, PLAI.</DIV><BR><DIV> <SPAN class="Apple-style-span" style="border-collapse: separate; border-spacing: 0px 0px; color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; text-align: auto; -khtml-text-decorations-in-effect: none; text-indent: 0px; -apple-text-size-adjust: auto; text-transform: none; orphans: 2; white-space: normal; widows: 2; word-spacing: 0px; "><SPAN class="Apple-style-span" style="border-collapse: separate; border-spacing: 0px 0px; color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; text-align: auto; -khtml-text-decorations-in-effect: none; text-indent: 0px; -apple-text-size-adjust: auto; text-transform: none; orphans: 2; white-space: normal; widows: 2; word-spacing: 0px; "><DIV>Gregory Woodhouse</DIV><DIV><A href="mailto:gregory.woodhouse@sbcglobal.net">gregory.woodhouse@sbcglobal.net</A></DIV><DIV><BR class="khtml-block-placeholder"></DIV><DIV>"Those who are enamored of practice</DIV><DIV>without theory are like a pilot who goes</DIV><DIV>into a ship without rudder or compass."</DIV><DIV>--Leonardo da Vinci (1452-1519)</DIV><DIV><BR class="khtml-block-placeholder"></DIV><BR class="Apple-interchange-newline"></SPAN></SPAN> </DIV><BR></BODY></HTML>