On Mon, Jan 7, 2013 at 8:48 PM, Andy Wingo <[email protected]> wrote:

> Hi,
>
> I don't have much more to say about the r7rs, but there is this one
> point.
>
> On Sun 06 Jan 2013 02:53, Alex Shinn <[email protected]> writes:
>
> >     Also it's not true, unfortunately!  Because in the next section,
> >     "5.3.3
> >     Multiple-value definitions", we see the introduction of
> >     `define-values'
> >     with an optimistically short specification and no corresponding
> >     expansion.
> >
> > Define-values is just derived syntax, it doesn't need special
> > treatment.
>
> Ah, I hadn't seen the expansion in the appendix.  It does seem to be
> broken, though; var0 will hold the list of values, not the first value.
>

I forgot to double check on this.  I just did and believe you
read the reference implementation wrong.  The derived syntax
comes directly from the chibi definition, which works fine and
passes the define-values case in the R7RS test suite.


> Also, if used at the top-level, the above and the report expansion may
> or may not bind an unrenamed variable ("dummy" or "values"), depending
> on the implementation.  Not so great.
>

This is a corner case that implementations handle differently,
but the correct behavior is to rename the binding so it's not
an issue.

Also the reference implementation has the advantage that
you only ever see the "dummy" in the degenerate, zero-values
case.

-- 
Alex
_______________________________________________
Scheme-reports mailing list
[email protected]
http://lists.scheme-reports.org/cgi-bin/mailman/listinfo/scheme-reports

Reply via email to