Re: Regarding exceptions
- From: Matthias Clasen <mclasen redhat com>
- To: gtk-devel-list gnome org
- Subject: Re: Regarding exceptions
- Date: Sat, 04 Sep 2004 23:17:14 -0400
Am Samstag, den 04.09.2004, 16:07 +0100 schrieb Andy Wingo:
> Hey all,
>
> I'm the maintainer of the guile bindings for the gnome library stack.
> Like many other languages with gtk bindings, guile supports nonlocal
> exits via exceptions. Guile's exceptions jump down the stack using
> setjmp() and longjmp(), like those of perl and C++. (Python uses the
> more unix-y magic return value to indicate an exception was thrown,
> AFAIK.)
>
> GLib-based libraries, however, are not exception-safe, because they
> (naturally) assume that they can clean up after calling a function or a
> closure. This means that one cannot throw an exception across Gtk+ or
> GObject code without a likely segfault or other baby-killing error.
>
> This is a problem in the sense that it limits the expressivity of
> higher-level languages to a common denominator of C. It would be nice if
> this limitation could be removed.
>
> I have a proposal that I'd like some comment on. The whole idea might
> just be too complicated; do let me know if this is way off the deep end.
>
A
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]