[plt-scheme] Please help test version 359.100

From: Matthias Felleisen (matthias at ccs.neu.edu)
Date: Mon Nov 13 21:39:11 EST 2006

I don't think this is relevant. The true question is whether

  (+ (for-each add1 '()) (for-each sub1 '()))

steps to

  (+ some-value some-value)

or to

  (+ some-value some-different-value)

I believe that the second one is the case already. -- Matthias


On Nov 13, 2006, at 6:52 PM, Jacob Matthews wrote:

> On Nov 13, 2006, at 5:31 PM, Robby Findler wrote:
>
>> Is "some object" allowed to be multiple values or not? That text
>> suggests not.
>
> "Types are associated with values (also called objects) rather than  
> with variables" (section 1.1) seems to be the only definition of  
> what an 'object' is. I think it's clear that they are saying that  
> values are also called objects, and that by the normal rules of  
> English we can conclude that the singular 'object' means the same  
> thing as the singular 'value'. So the question becomes, are  
> multiple values the same thing as a single value?  The report seems  
> to think not (I'm going here by the descriptions of the values and  
> call-with-values functions in section 6.4), though it plays its  
> usual trick of simply not defining what happens if a context  
> expects a single value and it receives multiple ones.
>
> Applying this back to the original question, I think we have to  
> conclude that for-each is supposed to be able to be called in  
> contexts that expect exactly one value. In Schemes like PLT Scheme  
> where contexts that expect one value signal an error if they  
> receive some other number, then it's a violation of R5RS for for- 
> each to behave the way 359.100 did; but for Schemes like Bigloo  
> that have coercion rules that take a multi-value return to a single- 
> value context, it's not a violation.
>
> -jacob
>
> (I actually wrote up a version of this before and then deleted it,  
> thinking it was too technical for anybody to care about ... looks  
> like I was wrong. :) )



Posted on the users mailing list.