[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: when and unless
From: |
Chris K. Jester-Young |
Subject: |
Re: when and unless |
Date: |
Wed, 7 Dec 2011 11:10:20 -0500 |
User-agent: |
Mutt/1.5.20 (2009-06-14) |
On Tue, Dec 06, 2011 at 12:17:06PM +0100, David Kastrup wrote:
> I've actually wondered if it would not make sense to return
> *unspecified* in the case of the plain else-less if even if the
> condition is true, namely when you write (if #t #t).
This cannot be done without breaking the tail position guarantee that
"if" has. i.e., Scheme specifies that for expressions of the form
(if TEST THEN ELSE)
(if TEST THEN)
that THEN and ELSE are both in tail position. Tail position means that
the evaluation of THEN or ELSE returns to the caller directly, and
there is no chance for the system to intervene, such as by replacing
the return value with unspecified.
Cheers,
Chris.
- Re: when and unless, (continued)
- Re: when and unless, David Kastrup, 2011/12/06
- Re: when and unless, Andy Wingo, 2011/12/06
- Re: when and unless, David Kastrup, 2011/12/06
- Re: when and unless, Chris K. Jester-Young, 2011/12/06
- Re: when and unless, David Kastrup, 2011/12/07
- Re: when and unless, Chris K. Jester-Young, 2011/12/07
- Re: when and unless, David Kastrup, 2011/12/08
- Re: when and unless, Chris K. Jester-Young, 2011/12/08
- Re: when and unless, David Kastrup, 2011/12/08
- Re: when and unless, Ian Price, 2011/12/08
- Re: when and unless,
Chris K. Jester-Young <=
Re: when and unless, Chris K. Jester-Young, 2011/12/06
Re: when and unless, Ludovic Courtès, 2011/12/06