[plt-scheme] handle-evt can wrap handle-evt

From: Robby Findler (robby at cs.uchicago.edu)
Date: Wed Feb 21 20:10:42 EST 2007

I don't see any value in guaranteeing that a handle event's handler
function is called in tail position, except in the case that there
aren't other handle events in there. And, I think it makes it harder
to abstract to disallow this. I can't think of any examples, tho.

It might be fun to see if drscheme still works with that restriction.

Robby

On 2/21/07, Matthew Flatt <mflatt at cs.utah.edu> wrote:
> At Wed, 21 Feb 2007 07:00:44 -0500 (EST), Dimitris Vyzovitis wrote:
> > It seems that it is legal for a handle-evt to wrap another handle-evt.
> > Aren't handle-evts supposed to be terminal events, that cannot be further
> > wrapped?
>
> I'll have to think about this one.
>
> Currently, the docs for `handle-evt?' are incorrect, because they say
> that `handle-evt' does not accept events produced by `handle-evt'. (The
> docs for `handle-evt' mention no such prohibition, unlike the docs for
> `wrap-evt'.)
>
> But maybe MzScheme should change in this case. Obviously, the inner
> event's handler is not called in tail position with respect to the
> event's synchronization.
>
> In the implementation, the key prohibition is against wrapping a handle
> event by `wrap-evt', because breaks have to be disabled in a particular
> way when the outer event's wrapper is called. Allowing `handle-evt' on
> other handle events doesn't create any trouble in the implementation,
> but it does seem to violate the intent of handle events.
>
> Unless I can remember (or think of) a reason why nesting `handle-evt's
> should be allowed, I'll change MzScheme.
>
> Matthew
>
> _________________________________________________
>   For list-related administrative tasks:
>   http://list.cs.brown.edu/mailman/listinfo/plt-scheme
>


Posted on the users mailing list.