Re: Regarding exceptions



Hi Owen,

On Sun, 2004-09-05 at 13:56 -0400, Owen Taylor wrote:
> I think it would be great if someone went through past discussions
> on this list and wrote a FAQ entry about why we aren't going to add
> exceptions to GLib or GTK+.

I started to try to write this, but my brain hurts if I write something
I don't believe. Sorry to be a bore. The reasons I saw were that:

1. setjmp/longjmp aren't portable
2. it's not safe for code in between that's not expecting it
3. it's not safe with non-C languages
4. automatic destruction of stack-allocated objects isn't possible

1 isn't true (cf. perl, guile). 2 is, but one could apply the same
argument to threads. Naturally with 3 there has to be interfaces on both
sides. The CSEH techniques in the reliable-c paper linked to earlier
would make 4 easier as well.

I'll still write a FAQ entry, but I'd like to understand the answer
first.

Regards,
-- 
Andy Wingo <wingo pobox com>
http://ambient.2y.net/wingo/



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