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

From: Matthias Felleisen (matthias at ccs.neu.edu)
Date: Fri Jul 26 13:06:47 EDT 2013

[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 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 that will be tricky to detect.
> 
> I could see how that might be a better choice for debugging. Especially
> since it seems that people don't check `handle-evt?` on events (which
> you would need to do to ensure tail-behavior in semantics 2).
> 
> In particular, there are zero uses of `handle-evt?` in the codebase
> outside of tests.
> 
> Since it's primarily a performance debugging feature, it seems OK to
> ignore the distinction in Typed Racket and keep the current semantics.
> 
> Thanks,
> Asumu
> _________________________
>  Racket Developers list:
>  http://lists.racket-lang.org/dev


Posted on the dev mailing list.