[plt-scheme] swindle: (define (values a b) (values 1 2))

From: jos koot (jos.koot at tiscali.nl)
Date: Sat Sep 17 04:49:38 EDT 2005

Thanks for your reply. You wrote:
> (Judging by the `(define a (+ a 1000))', you seem to be attached to
> the top-level behavior...)
Not necessarily. My examples did not include `(define a (+ a 1000))', but 
this is not relevant. Include my examples in (let () ...) and my argument 
still holds, I think
Greetings, Jos
----- Original Message ----- 
From: "Eli Barzilay" <eli at barzilay.org>
To: "jos koot" <jos.koot at tiscali.nl>
Cc: "PLT-list" <plt-scheme at list.cs.brown.edu>
Sent: Wednesday, September 14, 2005 10:12 PM
Subject: Re: [plt-scheme] swindle: (define (values a b) (values 1 2))


> On Sep 12, jos koot wrote:
>> (define (values a b) (begin (void) (old-values (+ a 100) (+ b 100)))) ;
>> assigns new values to a and b
>> BUT:
>> (define (values a b) (void) (old-values (+ a 1000) (+ b 1000))) ; 
>> redefines
>> proc values
>
> This is confusing, I should fix it (sometimes...).
>
>
>> I dont like this. I think (define (values <ident> ...) <expr1>
>> <expr> ...)  should always define/assign to var values (unless
>> syntax define has been redefined). I think another syntactic form
>> should be choosen for (define (values a b) (values 1 2)) if it is to
>> define/assign vars a and b (e.g: define-values)
>
> This form was an experiment with another way to define multiple
> bindings.  It may be confusing -- but only the top-level is a problem,
> since in a module context you cannot redefine `values' anyway.
> (Judging by the `(define a (+ a 1000))', you seem to be attached to
> the top-level behavior...)
>
> -- 
>          ((lambda (x) (x x)) (lambda (x) (x x)))          Eli Barzilay:
>                  http://www.barzilay.org/                 Maze is Life!
>  For list-related administrative tasks:
>  http://list.cs.brown.edu/mailman/listinfo/plt-scheme 



Posted on the users mailing list.