From: Miles Bader <miles@gnu.org>
To: Lennart Borgman <lennart.borgman@gmail.com>
Cc: Emacs-Devel devel <emacs-devel@gnu.org>
Subject: Re: Making while interruptable
Date: Tue, 07 Jul 2009 08:26:44 +0900 [thread overview]
Message-ID: <878wj1s897.fsf@catnip.gol.com> (raw)
In-Reply-To: <e01d8a50907061602ma2bf188td49fb2c14497f99c@mail.gmail.com> (Lennart Borgman's message of "Tue, 7 Jul 2009 01:02:51 +0200")
Lennart Borgman <lennart.borgman@gmail.com> 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.
next prev parent reply other threads:[~2009-07-06 23:26 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-07-06 19:40 Making while interruptable Lennart Borgman
2009-07-06 22:43 ` Miles Bader
2009-07-06 23:02 ` Lennart Borgman
2009-07-06 23:26 ` Miles Bader [this message]
2009-07-06 23:46 ` Lennart Borgman
2009-07-06 23:58 ` Miles Bader
2009-07-07 0:17 ` Lennart Borgman
2009-07-11 19:35 ` Stefan Monnier
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=878wj1s897.fsf@catnip.gol.com \
--to=miles@gnu.org \
--cc=emacs-devel@gnu.org \
--cc=lennart.borgman@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.