[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Gnu-arch-users] Nit
From: |
David Brown |
Subject: |
Re: [Gnu-arch-users] Nit |
Date: |
Tue, 21 Oct 2003 10:54:38 -0700 |
User-agent: |
Mutt/1.5.4i |
On Tue, Oct 21, 2003 at 08:54:33AM -0700, Tom Lord wrote:
> ...
> But I'll almost never want that in a language that lacks GC and,
> when I do, I can achieve the effect with setjmp/longjmp.
> I certainly don't want it to be the default in _any_ language.
> ...
BTW, these issues have been long debated, for many years, much of it
going into the design of the Ada language. Most languages that
implement exceptions have settled onto a similar solution, usually just
adding stuff to return values, rather than just raising a simple
exception. Doing this well requires GC. It can be done poorly, as C++
demonstrates.
I think the problem described with the exception raised by a called
function is an error of trying to reuse the same exceptions by the
different parts of the code. Ultimately, it is a bug in the code
calling that function.
Exceptions can be quite useful, but like OO they also have a tendency to
obscure what is happening in the code (although much less so than OO).
Even with simple, well thought-out exceptions, such as those in Ada, it
is possible to have catastrophic results (think Ariane V).
Dave
- Re: [Gnu-arch-users] Nit, (continued)
- Re: [Gnu-arch-users] Nit, Tom Lord, 2003/10/21
- Re: [Gnu-arch-users] Nit, Dustin Sallings, 2003/10/21
- Re: [Gnu-arch-users] Nit, Miles Bader, 2003/10/21
- Re: [Gnu-arch-users] Nit, Tom Lord, 2003/10/21
- [Gnu-arch-users] Re: Nit, Miles Bader, 2003/10/21
- [Gnu-arch-users] Re: Nit, Tom Lord, 2003/10/21
- Re: [Gnu-arch-users] Nit, Tom Lord, 2003/10/21
- Re: [Gnu-arch-users] Nit, Jan Hudec, 2003/10/22
- Re: [Gnu-arch-users] Nit, Mark A. Flacy, 2003/10/22
- Re: [Gnu-arch-users] Nit, Tom Lord, 2003/10/21
- Re: [Gnu-arch-users] Nit,
David Brown <=
- Re: [Gnu-arch-users] Nit, Robin Farine, 2003/10/21
- Re: [Gnu-arch-users] Nit, Robin Farine, 2003/10/21
- Re: [Gnu-arch-users] Nit, Tom Lord, 2003/10/21
- Re: [Gnu-arch-users] Nit, Dustin Sallings, 2003/10/21
- [Gnu-arch-users] Re: Nit, Miles Bader, 2003/10/21
- [Gnu-arch-users] Re: Nit, Miles Bader, 2003/10/22
- [Gnu-arch-users] Re: Nit, Dustin Sallings, 2003/10/22
- [Gnu-arch-users] Re: Nit, Tom Lord, 2003/10/22
- Re: [Gnu-arch-users] Nit, Tom Lord, 2003/10/22
- Re: [Gnu-arch-users] Nit, Robert Collins, 2003/10/22