[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Scheme-reports] multiple values module

7 hours ago, Aaron W. Hsu wrote:
> On Wed, 25 May 2011 11:07:25 -0400, Eli Barzilay <eli@x> wrote:
> > 15 minutes ago, Alex Shinn wrote:
> >>
> >> It was known behavior, left in place mostly because I didn't
> >> actually care  Any Scheme that behaves like Chibi in this case can
> >> be fixed with: [...]  The actual fix in Chibi was just one line,
> >> [...]
> > The question is still open, AFAICT: is the pre-fix problem something
> > that is fine to have in an r5/7rs?  According to John, your bug fix
> > was not needed.
> From my reading of the R5RS, I concur with John that the original
> behavior of Chibi was not breaking compliance with the standard.
> That is, R5RS and R6RS both allow implementations to do *whatever*
> they want if a continuation expecting a single value receives more
> than one value.

That's *not* the chibi problem that I talked about.  To repeat:

    (lambda ()
      (call-with-current-continuation (lambda (k) (k 1 2 3))))
    (lambda (x y z) 'ok))

the problem here is that the `k' continuation is one that expects
three values, and it is given three values.  According to John, that's
valid r5rs-ims.

The other issues (sending different number of values to a cont.,
reifying values, and even reifying them as a list) are things that I
argued are bad (to varying degrees, the last being particularly bad),
but I'm aware of them being allowed.  (Specifically, chicken's thing
of dropping values or making unspecified ones up are likely to be
common, since it's roughly the same as in CL.)

          ((lambda (x) (x x)) (lambda (x) (x x)))          Eli Barzilay:
                    http://barzilay.org/                   Maze is Life!

Scheme-reports mailing list