Re: [Scheme-reports] multiple values module Andy Wingo (25 May 2011 08:20 UTC)
Re: [Scheme-reports] multiple values module Eli Barzilay (25 May 2011 09:04 UTC)
Re: [Scheme-reports] multiple values module Andy Wingo (25 May 2011 10:09 UTC)
Re: [Scheme-reports] multiple values module Eli Barzilay (25 May 2011 10:34 UTC)
Re: [Scheme-reports] multiple values module Eli Barzilay (25 May 2011 12:02 UTC)
Re: [Scheme-reports] multiple values module Alex Shinn (25 May 2011 14:51 UTC)
Re: [Scheme-reports] multiple values module Eli Barzilay (25 May 2011 15:08 UTC)
Re: [Scheme-reports] multiple values module Aaron W. Hsu (25 May 2011 19:58 UTC)
Re: [Scheme-reports] multiple values module Eli Barzilay (26 May 2011 02:48 UTC)
Re: [Scheme-reports] multiple values module Eli Barzilay (26 May 2011 02:55 UTC)
Re: [Scheme-reports] multiple values module Aaron W. Hsu (26 May 2011 21:34 UTC)

Re: [Scheme-reports] multiple values module Andy Wingo 25 May 2011 10:08 UTC

Hi Eli,

On Wed 25 May 2011 11:04, Eli Barzilay <eli@barzilay.org> writes:

> To make John's point: would you similarly want to ignore (car #f) and
> (cons 1 2 3) throwing errors?  More importantly, is there any point to
> an implementation that would do something else?  In the context of
> multiple values, not throwing an error when a continuation is applied
> to the right number of arguments greatly reduces their utility (as far
> as a common convention goes).

There is a difference between "errors" and "unspecified behavior", as
I'm sure you know.  `(car #f)' is an instance of the former; as to the
latter, "The effect of passing no value or more than one value to
continuations that were not created by call-with-values is unspecified."

The R6RS thing of saying that (car #f) must raise an exception of a
particular kind was quite annoying.

> Chibi's problem

Is probably just a bug.  I'll assume that's the case; it was a good
catch on your part.

> Peter talked about chicken's behavior of dropping extra values but
> there's no reification; guile breaks (I*M*O) things further and
> reifies values but still respects the above

Just to clarify: Guile does the Ashley/Dybvig thing (an additional MV
return address, and returns to that address expect N values on the stack
+ number-of-values marker).  For continuations created by
call-with-values, the correct number of values is required (or an error
is signalled).  For implicitly single-valued continuations, Guile
truncates >1 values to 1 value, and (unlike Chicken) errors if 0 values
are returned.

I think it's sensible, but hey, folks can disagree (and Ashley and
Dybvig did!).  I think the R5RS wording is careful and correct.

Regards,

Andy
--
http://wingolog.org/

_______________________________________________
Scheme-reports mailing list
Scheme-reports@scheme-reports.org
http://lists.scheme-reports.org/cgi-bin/mailman/listinfo/scheme-reports