gnu-arch-users
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Gnu-arch-users] Nit


From: Tom Lord
Subject: Re: [Gnu-arch-users] Nit
Date: Tue, 21 Oct 2003 11:22:45 -0700 (PDT)

    > From: address@hidden

    > A part you seem to miss is that catching is part of the language and
    > you can catch seperate exceptions via seperate catch lines, meaning
    > that letting through is quite simple.

?

I'm saying that "letting through" is _too_ simple and easily leads to
inappropriate handlers being invoked if it is the default behavior.

I'm not saying that exceptions should _never_ be let through, only
that if you want a programming system to help you write robust code,
then that system should require that you let through exceptions only
explicitly, not implicitly.

    > You see; exception handling is just about flow-control.

It's more like an unholy marriage between flow control (in the form of
upwards-only-continuations), dynamic scope (in the form of `try'
clauses and the like), and pattern matching (in the form of `except'
clauses and the like).

There's so many variations on how to bring those three components
together that perhaps the most expressive language is one in which
they are all separately available so that you can code up the
particular kind of exception handling that best fits the problem at
hand.   In the meanwhile, the art for authors of general purpose
libraries is then to write libraries that don't depend too strongly on
any single exception mechanism -- for which purpose error codes are a
pretty good answer.

-t




reply via email to

[Prev in Thread] Current Thread [Next in Thread]