[plt-scheme] Multiple values

From: Robby Findler (robby at cs.uchicago.edu)
Date: Tue Feb 21 10:49:56 EST 2006

At Tue, 21 Feb 2006 16:36:43 +0100 (CET), hufflen jean-michel wrote:
> Back to my question about PLT Scheme's behaviour, I was surprised
> because I thought that values' result may be viewed as a whole, that
> is, as a kind of "packaged values" to be consumed later.

The whole point of values is they are not that. (FWIW, this isn't PLT
Scheme's choice. R5RS specifies it.)

Two last comments from the detractors gallery before I quit.

They introduce a lot of new errors that were not there before. For
example, the test position in an if has to check the number of values,
applications have to check the function and arg positions for the
number of values, let and letrec have to check their right-hand sides
for a single value, set! has to check its expression positions is a
single value ... every non-tail position in the language has to add
this check.

Anyways, Adam's certainly right that you can avoid allocation, but many
of the other arguments for multiple values seem to apply equally well
to using `match' and some kind of a record or tuple.

Robby



Posted on the users mailing list.