[plt-scheme] passing multiple "values" between functions

From: Matthias Felleisen (matthias at ccs.neu.edu)
Date: Mon Apr 6 14:41:42 EDT 2009

On Apr 6, 2009, at 1:37 PM, Anthony Cowley wrote:

> On Mon, Apr 6, 2009 at 7:49 AM, Matthias Felleisen  
> <matthias at ccs.neu.edu> wrote:
>>
>> On Apr 6, 2009, at 4:24 AM, Jakub Piotr Cłapa wrote:
>>
>>> On 4/6/09 9:23 AM, Martin DeMello wrote:
>>>>
>>>> that there is no "values" object that you can pass around till  
>>>> you're
>>>> ready to unpack it. Do values offer any advantage over using  
>>>> lists and
>>>> let-match?
>>>
>>> AFAIK returning multiple values does not require allocation (no  
>>> consing)
>>> and destructuring (the values go straight to the bindings).
>>
>> See Dybvig's analysis and experiments concerning this  
>> 'conjecture.' Turns
>> out that for an 'optimizing' compiler (such as Chez) the major  
>> difference
>> concern error reporting. (Think (let* ((x f returns (cons 1 2)))  
>> (a (car x))
>> (d (cdr x))) ...) can be optimized reasonably w/o allocation.)
>>
>> -- Matthias
>
> There was an interesting discussion of this on comp.lang.scheme a
> while ago which yielded this set of benchmarks:
> <http://www.ccs.neu.edu/home/will/Temp/Values/>


Thanks I wonder what it means when computer scientists have to re- 
benchmark such a result every so many years. Kent published his paper  
nearly 10 years ago. -- Matthias



Posted on the users mailing list.