From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: ludovic.courtes@laas.fr (Ludovic =?iso-8859-1?Q?Court=E8s?=) Newsgroups: gmane.lisp.guile.user Subject: Exceptions Date: Mon, 26 Sep 2005 14:23:29 +0200 Organization: LAAS-CNRS Message-ID: <873bns2f26.fsf@laas.fr> References: <6efab235050925145055ba774c@mail.gmail.com> NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: sea.gmane.org 1127747626 20285 80.91.229.2 (26 Sep 2005 15:13:46 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Mon, 26 Sep 2005 15:13:46 +0000 (UTC) Cc: guile-user@gnu.org Original-X-From: guile-user-bounces+guile-user=m.gmane.org@gnu.org Mon Sep 26 17:13:40 2005 Return-path: Original-Received: from lists.gnu.org ([199.232.76.165]) by ciao.gmane.org with esmtp (Exim 4.43) id 1EJuct-0005hg-D9 for guile-user@m.gmane.org; Mon, 26 Sep 2005 17:10:43 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1EJucs-0001Yx-Ip for guile-user@m.gmane.org; Mon, 26 Sep 2005 11:10:42 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1EJsAY-0005i8-W2 for guile-user@gnu.org; Mon, 26 Sep 2005 08:33:19 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1EJs9x-0005QE-46 for guile-user@gnu.org; Mon, 26 Sep 2005 08:32:42 -0400 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1EJs2Q-0002rP-Uh for guile-user@gnu.org; Mon, 26 Sep 2005 08:24:55 -0400 Original-Received: from [140.93.0.15] (helo=laas.laas.fr) by monty-python.gnu.org with esmtp (TLS-1.0:DHE_RSA_3DES_EDE_CBC_SHA:24) (Exim 4.34) id 1EJs2N-0004Qo-7W for guile-user@gnu.org; Mon, 26 Sep 2005 08:24:51 -0400 Original-Received: by laas.laas.fr (8.13.1/8.13.4) with SMTP id j8QCOlro018429; Mon, 26 Sep 2005 14:24:48 +0200 (CEST) Original-To: Vorfeed Canal X-URL: http://www.laas.fr/~lcourtes/ X-Revolutionary-Date: 5 =?iso-8859-1?Q?Vend=E9miaire?= an 214 de la =?iso-8859-1?Q?R=E9volution?= X-PGP-Key-ID: 0xEB1F5364 X-PGP-Key: http://www.laas.fr/~lcourtes/ludovic.asc X-PGP-Fingerprint: 821D 815D 902A 7EAB 5CEE D120 7FBA 3D4F EB1F 5364 X-OS: powerpc-unknown-linux-gnu Mail-Followup-To: Vorfeed Canal , guile-user@gnu.org In-Reply-To: <6efab235050925145055ba774c@mail.gmail.com> (Vorfeed Canal's message of "Mon, 26 Sep 2005 01:50:37 +0400") User-Agent: Gnus/5.110004 (No Gnus v0.4) Emacs/21.4 (gnu/linux) X-Spam-Score: 0 () X-Scanned-By: MIMEDefang at CNRS-LAAS X-BeenThere: guile-user@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: General Guile related discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: guile-user-bounces+guile-user=m.gmane.org@gnu.org Errors-To: guile-user-bounces+guile-user=m.gmane.org@gnu.org Xref: news.gmane.org gmane.lisp.guile.user:4774 Archived-At: Hi, Vorfeed Canal writes: > 2. No way to use standard (for modern languages like C++, PHP or Java) > scheme with throw/catch and EXCEPTIONS HIERARCHY. [...] > About second problem. GNU Kawa (if we are talking about GNU GUILE it > makes sense to borrow from GNU Kawa, right?) has the following > solution to this problem: > > http://per.bothner.com/tmp/kawa/Exceptions.html > > primitive-throw exception > > Throws the exception, which must be an instance of a sub-class of > . Well, this is the object-oriented approach to exceptions. That doesn't mean you can't obtain a similar result using Guile's current exception mechanism. In particular, the KEY arg passed to `throw' and `catch' can be thought of as the ``class'' of the exception being thrown/caught. One of the additional arguments can be thought of as a subtype of the exception (see, for instance, `system-error' and `system-error-errno'). Admittedly, this may sometimes be more verbose than the use of a class hierarchy mechanism. Fortunately, `guile-library' contains an implementation of SRFI-35's hierarchical error conditions, and both `guile-library' and Guile (1.7) implement SRFI-34's exception handling routines. Only SRFI-36 (I/O error conditions) is missing. So I guess there's no valid reason not to use Guile. :-) Ludovic. _______________________________________________ Guile-user mailing list Guile-user@gnu.org http://lists.gnu.org/mailman/listinfo/guile-user