This site is a static rendering of the Trac instance that was used by R7RS-WG1 for its work on R7RS-small (PDF), which was ratified in 2013. For more information, see Home.

Ticket 174: Safe uses of multiple values

2012-10-09 00:46:02
WG1 - Core
cowan
major
cowan
fixed
source
closed
2011-05-06 21:34:33
defect

Currently, uses of values where the values are discarded anyway is illegal, but all the usual Schemes except SCM and SSCM accept them (I tested with begin). Should we go with something close to the R6RS wording?

"The continuations of all non-final expressions within a sequence of expressions, such as in lambda, begin, let, let*, letrec, letrec*, case, and cond forms, take an arbitrary number of values."

The definition of begin would need to change too:

(define-syntax begin (syntax-rules () ((begin exp) exp) ((begin exp1 exp2 ...) (call-with-values (lambda () exp1) (lambda args (begin exp2 ...))))))
descriptionCurrently, uses of `values` where the values are discarded anyway is illegal, but all the usual Schemes except SCM and SSCM accept them (I tested with `begin`). Should we go with something close to the R6RS wording? "The continuations of all non-final expressions within a sequence of expressions, such as in `lambda`, `begin`, `let`, `let*`, `letrec`, `letrec*`, `case`, and `cond` forms, take an arbitrary number of values." Currently, uses of `values` where the values are discarded anyway is illegal, but all the usual Schemes except SCM and SSCM accept them (I tested with `begin`). Should we go with something close to the R6RS wording? "The continuations of all non-final expressions within a sequence of expressions, such as in `lambda`, `begin`, `let`, `let*`, `letrec`, `letrec*`, `case`, and `cond` forms, take an arbitrary number of values." The definition of `begin` would need to change too: {{{ (define-syntax begin (syntax-rules () ((begin exp) exp) ((begin exp1 exp2 ...) (call-with-values (lambda () exp1) (lambda args (begin exp2 ...)))))) }}}

I think using the term "any number" instead of "an arbitrary number" probably makes more sense, but other than that, I would go with it.

resolution
statusnewdecided

We voted to adopt this.

owneralexshinncowan
statusdecidedwriting
resolutionfixed
statuswritingclosed