Re: [racket-dev] Motivation for handle-evt/wrap-evt contracts

2013-07-26 Thread Matthias Felleisen
[Catching up] Does CML have anything even remotely comparable to handle-evt and does it assign a type distinction? -- Matthias On Jul 25, 2013, at 2:45 PM, Asumu Takikawa wrote: On 2013-07-25 12:36:32 -0600, Matthew Flatt wrote: My thought was that you should only use `handle-evt' if

Re: [racket-dev] Motivation for handle-evt/wrap-evt contracts

2013-07-26 Thread Robby Findler
It has exactly that (without the dynamic check). And no, I don't think so. On Friday, July 26, 2013, Matthias Felleisen wrote: [Catching up] Does CML have anything even remotely comparable to handle-evt and does it assign a type distinction? -- Matthias On Jul 25, 2013, at 2:45 PM,

[racket-dev] Motivation for handle-evt/wrap-evt contracts

2013-07-25 Thread Asumu Takikawa
Hi all, I had a question about `handle-evt` and synchronizable events in general. I was trying to understand the documentation and only have a partial idea of the motivation behind `handle-evt` and the contracts of `handle-evt` and `wrap-evt`. In particular, what is the motivation for

Re: [racket-dev] Motivation for handle-evt/wrap-evt contracts

2013-07-25 Thread Robby Findler
PS: this distinction seems like something not worth reflecting in the type system. Robby On Thu, Jul 25, 2013 at 12:55 PM, Robby Findler ro...@eecs.northwestern.edu wrote: I think the issue is that the tail guarantee can't be met if there are two handles (one won't be in tail position wrt

Re: [racket-dev] Motivation for handle-evt/wrap-evt contracts

2013-07-25 Thread Robby Findler
I think the issue is that the tail guarantee can't be met if there are two handles (one won't be in tail position wrt to the sync). Robby On Thu, Jul 25, 2013 at 12:48 PM, Asumu Takikawa as...@ccs.neu.edu wrote: Hi all, I had a question about `handle-evt` and synchronizable events in

Re: [racket-dev] Motivation for handle-evt/wrap-evt contracts

2013-07-25 Thread Asumu Takikawa
On 2013-07-25 12:55:25 -0500, Robby Findler wrote: I think the issue is that the tail guarantee can't be met if there are two handles (one won't be in tail position wrt to the sync). I understand. I guess what I'm asking is that there seem to be two reasonable choices for the semantics

Re: [racket-dev] Motivation for handle-evt/wrap-evt contracts

2013-07-25 Thread Robby Findler
Probably we just didn't consider that! It does seem better. Robby On Thu, Jul 25, 2013 at 1:06 PM, Asumu Takikawa as...@ccs.neu.edu wrote: On 2013-07-25 12:55:25 -0500, Robby Findler wrote: I think the issue is that the tail guarantee can't be met if there are two handles (one

Re: [racket-dev] Motivation for handle-evt/wrap-evt contracts

2013-07-25 Thread Matthew Flatt
My thought was that you should only use `handle-evt' if you need tail behavior for something like a loop. If you use `handle-evt' and you're not getting tail behavior (but `sync' continues on, anyway), then something has gone wrong --- and maybe it's better to get an error than have a slow leak

Re: [racket-dev] Motivation for handle-evt/wrap-evt contracts

2013-07-25 Thread Asumu Takikawa
On 2013-07-25 12:36:32 -0600, Matthew Flatt wrote: My thought was that you should only use `handle-evt' if you need tail behavior for something like a loop. If you use `handle-evt' and you're not getting tail behavior (but `sync' continues on, anyway), then something has gone wrong --- and