[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Scheme-reports] ANN: first draft of R7RS small language available
- To: Andy Wingo <wingo@x>
- Subject: Re: [Scheme-reports] ANN: first draft of R7RS small language available
- From: Andre van Tonder <andre@x>
- Date: Tue, 3 May 2011 09:40:44 -0400 (EDT)
- Cc: scheme-reports <scheme-reports@x>
- In-reply-to: <m31v0fsz0v.fsf@unquote.localdomain>
- References: <BANLkTim=5TfhBkDHj9Pv_R+S99JrEeNojw@mail.gmail.com> <Pine.SOC.4.64.1105030849430.15500@oow.het.brown.edu> <m31v0fsz0v.fsf@unquote.localdomain>
On Tue, 3 May 2011, Andy Wingo wrote:
> On Tue 03 May 2011 14:52, Andre van Tonder <andre@x> writes:
>
>> (let ((else #f))
>> (cond (else (display "else clause matched"))))
>>
>> should be equivalent to
>>
>> (let ((x #f))
>> (cond (x (display "else clause matched"))))
>
> Playing devil's advocate here... what about this one?
>
> (let ((else #f))
> (quote else))
>
> I think Andrzej's argument is that cond treats `else' not as an
> identifier but as a datum, as `quote' does.
The problem is that QUOTE always contains a datum, which is not subject to
alpha renaming. On the other hand, in
(let ((else #f))
(cond (else (display "else clause matched"))))
the first position in the COND clause can actually be a variable, and therefore
is not protected from alpha renaming.
_______________________________________________
Scheme-reports mailing list
Scheme-reports@x
http://lists.scheme-reports.org/cgi-bin/mailman/listinfo/scheme-reports