Opened 6 years ago

Closed 4 years ago

#174 closed defect (fixed)

Safe uses of multiple values

Reported by: cowan Owned by: cowan
Priority: major Milestone:
Component: WG1 - Core Keywords:

Description (last modified by cowan)

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)
    ((begin exp1 exp2 ...)
         (lambda () exp1)
       (lambda args
         (begin exp2 ...))))))

Change History (5)

comment:1 Changed 6 years ago by cowan

  • Description modified (diff)

comment:2 Changed 6 years ago by arcfide

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.

comment:3 Changed 6 years ago by alexshinn

  • Status changed from new to decided

We voted to adopt this.

comment:4 Changed 6 years ago by cowan

  • Owner changed from alexshinn to cowan
  • Status changed from decided to writing

comment:5 Changed 4 years ago by cowan

  • Resolution set to fixed
  • Status changed from writing to closed
Note: See TracTickets for help on using tickets.