I'll take a little space at the top of this message to pop out a level and discuss what seems to be an underlying issue here. It is true that many of the things in Scheme can be expressed in a language that just has lambda, variables, and applications, but I do not think that means such things should be dropped from the semantics.
While did think carefully about what would be redundant when writing the semantics (and did avoid many redundant things), the decision of whether or not something went into the semantics was based on how useful it would be for people to use the semantics to understand how their programs (or some kernel of their programs) behave, presumably exploiting PLT Redex's stepper to do so. As an anecdote, I recently did that with some code from the 80s (from the Constraining Control paper by Friendman/Haynes). That paper contains code that nearly runs in the semantics. There were a few minor things that I had to write out, namely "and" and "case" and a few things I had to define in the semantics "not" and "for-each" and this wasn't a big deal. But, I had to rewrite out "let" expressions. This turned out to be a big deal. It is much harder to follow along with the reductions and understand what's happening when your let expressions are "inside out" as lambda applications. Indeed, I've been thinking about adding let to the semantics, just to make such exploration easier. So, that is the spirit in which I think that the library top-level should remain. It was easy for me to stick a few definitions into my program (in the above anecdote) without having to inline the definitions into the uses (and possibly have to rewrite more, depending on how they would be used). Of course, there are other arguments to include the top-level, if the semantics become what Kent asked for in his formal comment (since it will have its own unique subtleties that will probably be of interest). On 3/15/07, AndrevanTonder <[EMAIL PROTECTED]> wrote:
On Thu, 15 Mar 2007, Robby Findler wrote: > lambda cannot express letrec. Does the current semantics of DEFINE express LETREC*?
Not as written, no (since the defines have to be at the top-level).
Regarding expressing LETREC* in terms of LAMBDA, giving some interpretation to <undefined> would seem to be a low hurdle to clear to make this possible.
You also need assignment (unless you allow yourself to do non-local rewrites, of course). Robby _______________________________________________ r6rs-discuss mailing list [email protected] http://lists.r6rs.org/cgi-bin/mailman/listinfo/r6rs-discuss
