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

From: Asumu Takikawa (asumu at ccs.neu.edu)
Date: Thu Jul 25 14:06:34 EDT 2013

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 here:

  (1) Do not allow an event that is created as a handle event to
      ever have two handlers.

  (2) If an event ever ends up having two handlers, that's okay, but
      it will not respond #t to `handle-evt?`.

My question boils down to "why semantics (1) and not (2)?"

(though it doesn't matter much if we just choose not to reflect
 this in the type system, but that means you will sometimes
 get a contract error saying "expected (not/c handle-evt?) but ...")

Cheers,
Asumu

Posted on the dev mailing list.