<div>Thanks David, please see inline.</div><div><br></div><div class="gmail_quote">On Wed, Dec 1, 2010 at 6:09 PM, David Van Horn <span dir="ltr"><<a href="mailto:dvanhorn@ccs.neu.edu">dvanhorn@ccs.neu.edu</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;"><div class="im"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<br></blockquote></div>
This is not entirely true, but substitution and effects are subtle.<br></blockquote><div><br></div><div>I can see that it works if things are by-reference, but by-value will appear to be broken, no? </div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
* it does not address closure<br>
</blockquote>
<br>
You don't need closures in a substitution model.</blockquote><div><br></div><div>Not sure if I understand what you mean, but I mean I need to implement closure, and substitution does not appear to have advantage over simply stuffing the values into the environment for a delayed evaluation in an interpreter. </div>
<div><br></div><div>Perhaps a better rephrase for the whole question is: what's a good place to hold the values needed for the interpreter to perform substitution/evaluation? In the environment? In the call frame? I am getting the feeling that I need my own call frame and stack even in an minimal interpreter. </div>
<div><br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;"><div class="im">
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Maybe I am looking too far ahead, but it seems like I cannot get away<br>
from needing my own call stack? Or am I missing something?<br>
</blockquote>
<br></div>
I'm not exactly sure what you mean about your own call stack. The environment and the control stack are separate issues.</blockquote><div><br></div><div>I agree that they are separate issues, but as the implementer I need to consider them together to have a full solution. I.e. what are all of the components I need to implement in order to have a minimal interpreter (primitive types, lambda, define, set, quote, if) without using Racket's built-in eval. </div>
<div><br></div><div>Thanks,</div><div>yc</div><div><br></div><div><br></div></div>