[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Making while interruptable
From: |
Miles Bader |
Subject: |
Re: Making while interruptable |
Date: |
Tue, 07 Jul 2009 08:26:44 +0900 |
Lennart Borgman <address@hidden> writes:
>>> The idea is that the user with some let bound variable can control how
>>> every call to `while' handles pending input. If pending input is
>>> detected then `while' will throw to a catch symbol that is let bound
>>> by the user.
>>
>> This is very, very, bad. It _will_ screw up lots of code in hard to
>> debug and confusing ways.
>
> Could you tell me exactly why you think so? Are you aware of that I
> placed the code for interruption at the same place as QUIT is placed
> in the c code. So I assumed that it was ok to jump out there
Most code is not prepared to deal with random non-local control
transfers. In such cases, a quit _also_ has the potential to screw
something up, but a quit is much much rarer, is explicitly invoked by
the user, and the user knows that after quitting, things may be in a
funny state (it's an emergency action of sorts). This limits the
problem enough that it's something we can live with.
The mere presence of _input_ on the other hand is _normal_, and your
flag is not connected with any explicit user action. So with your
system, the number of unexpected non-local control transfers would go
_way_ up, and would not be obviously connected with any user action.
-Miles
--
Kilt, n. A costume sometimes worn by Scotchmen [sic] in America and Americans
in Scotland.
Re: Making while interruptable, Stefan Monnier, 2009/07/11