Re: [Scheme-reports] multiple values, and, or, when, unless
Jussi Piitulainen 06 Jan 2013 11:13 UTC
Alex Shinn writes:
> On Sun, Jan 6, 2013 at 7:15 PM, Andy Wingo wrote:
> >
> > I used to agree with you, but requiring the consequent to be in
> > tail position means that the last expression is evaluated in the
> > continuation of the "when" expression as a whole. I don't think
> > you can get around this with a special "this is unspecified"
> > exception -- you've already specified it. Is there any definition
> > other than (if TEST (begin CONSEQUENT ...)) that actually fits the
> > requirements?
>
> It's not particularly useful to use when/unless in tail context
> anyway, so I think we should just remove these from the list
> of tail calls.
So (let handlificate-all ((next (get)))
(unless (eof-object? next)
(handlificate next)
(handlificate-all (get))))
would be a bad thing to write. Is this consistent with Scheme?
It would be better to remove when and unless altogether. Is there any
real downside to treating them as equivalent to (if TEST (begin ...))
and (if (not TEST) (begin ...)), as I think Andy is suggesting.
_______________________________________________
Scheme-reports mailing list
Scheme-reports@scheme-reports.org
http://lists.scheme-reports.org/cgi-bin/mailman/listinfo/scheme-reports