On Mon, Sep 14, 2009 at 6:00 PM, Brian Mastenbrook
<[email protected]> wrote:
> On Sep 14, 2009, at 4:50 PM, Andre van Tonder wrote:
>
>> On Mon, 14 Sep 2009, Brian Mastenbrook wrote:
>>
>>> `begin' is a binding form.
>>
>> No, BEGIN is not a binding form.
>
> Fine. So, which of the properties that I enumerated are you going to
> dispense with? The first, I presume. And what are you going to do with
> the R6RS two-pass semantics? Ignore them, I suppose.
>
> I don't think this is a workable solution. This is just the R(IEEE,
> 4,5)RS partisans exacting their revenge on the R6RS users.

This whole discussion shows why making "define" forms special
binding forms was an error.  Expressions would be wholly
compositional if `define' always operated on the top-level (or
library-level) environment.  Instead here we see their special
treatment used to argue for much more complicated
processing than is actually necessary.

I don't harbor any illusions about getting the distinction
between "internal" and "top-level" definitions removed in
favor of the simpler and more consistent option, but it
is a wart.

Also, if `define' did always act on the top-level, begin
could be implemented properly in terms of lambda.

Here's a question:  is the top-level environment a
lexical contour?  Is it a "scope" or the absence of
scope?

Lynn
P.S.  Aziz, this means I think your example should
be writable as
(let ((real-+ +))
   (define + (lambda args ....)))

_______________________________________________
r6rs-discuss mailing list
[email protected]
http://lists.r6rs.org/cgi-bin/mailman/listinfo/r6rs-discuss

Reply via email to