[plt-scheme] send/suspend return values

From: Matthias Felleisen (matthias at ccs.neu.edu)
Date: Mon Nov 22 13:28:08 EST 2004

On Nov 22, 2004, at 11:59 AM, Greg Pettyjohn wrote:

>  For list-related administrative tasks:
>  http://list.cs.brown.edu/mailman/listinfo/plt-scheme
>
> On Nov 21, 2004, at 4:17 PM, Matthias Felleisen wrote:
>
>> No. When you can (send/suspend f), send/suspend does not invoke f in 
>> tail-position. Instead it names the result and makes sure it is a 
>> response. I have to admit that after looking at the code I find it 
>> way too defensive. The author should have instead stated the contract 
>> of send/suspend as
>>
>>  (String -> X) -> X
>>
>> which would then allow f to return multiple values.
>
> You're proposed contract for send/suspend would break the web-server.
>
> It needs to be:  (string -> response) -> request
>
> The web-server doesn't know how to make a response out of an arbitrary 
> X and
> the continuation of send/suspend needs to get a request.
>
> A multi-valued send/suspend would have a contract like this:
> (string -> response . X) -> request . X

Greg is correct of course. I misread the code. Sorry -- Matthias

P.S. I don't understand the rest yet.



Posted on the users mailing list.