chicken-users
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Chicken-users] handling the undefined value


From: John Cowan
Subject: Re: [Chicken-users] handling the undefined value
Date: Wed, 24 Nov 2010 14:37:16 -0500
User-agent: Mutt/1.5.18 (2008-05-17)

Felix scripsit:

> I don't think this is a great idea: this will change the
> semantics of code using call-with-values, will be less efficient,
> and may throw errors in some cases - R5RS (in contrast to CL and
> R6RS) does not automatically adjust the number of result values
> to the number of values expected by the location where the
> result(s) is/are used.

Actually, R5RS leaves the results undefined, so CL-style is conformant.
R6RS leaves the results undefined *except* in the case of explicit or
implicit BEGIN.  So you can do what you like, except that (begin (values)
32) MUST return 32 in R6RS and MAY fail in R5RS implementations.

In fact, all of Racket, Gauche, MIT, Gambit, Chicken, Bigloo,
scsh/Scheme48, Guile, Kawa, SISC, Chibi, Petite, Ikarus, Larceny, Ypsilon,
Mosh, STklos, and IronScheme return 32; only SCM and sscm throw an error.
So the R6RS extension wouldn't have much impact.

-- 
How they ever reached any  conclusion at all    <address@hidden>
is starkly unknowable to the human mind.        http://www.ccil.org/~cowan
        --"Backstage Lensman", Randall Garrett



reply via email to

[Prev in Thread] Current Thread [Next in Thread]