[prev in list] [next in list] [prev in thread] [next in thread] 

List:       racket-users
Subject:    [plt-scheme] send/suspend return values
From:       matthias () ccs ! neu ! edu (Matthias Felleisen)
Date:       2004-11-22 18:28:08
Message-ID: 41ECC6FC-3CB4-11D9-A28F-000A95B04FB2 () ccs ! neu ! edu
[Download RAW message or body]

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.



[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic