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.devel Subject: Re: Backtrace and enhanced catch Date: Thu, 19 Jan 2006 10:38:02 +0100 Organization: LAAS-CNRS Message-ID: <878xtca77p.fsf@laas.fr> References: <200511301616.22258.bkorb@gnu.org> <87wthpkyan.fsf@ossau.uklinux.net> <43B69F41.6030509@xs4all.nl> <87hd8pb8o7.fsf@ossau.uklinux.net> <87lkxy3abo.fsf@ossau.uklinux.net> <877j9i31gc.fsf@ossau.uklinux.net> <87acebhf1o.fsf@ossau.uklinux.net> <87hd84pnxk.fsf@laas.fr> <87mzhti17e.fsf@ossau.uklinux.net> NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: sea.gmane.org 1137674070 13527 80.91.229.2 (19 Jan 2006 12:34:30 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Thu, 19 Jan 2006 12:34:30 +0000 (UTC) Cc: guile-devel@gnu.org Original-X-From: guile-devel-bounces+guile-devel=m.gmane.org@gnu.org Thu Jan 19 13:34:23 2006 Return-path: Envelope-to: guile-devel@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by ciao.gmane.org with esmtp (Exim 4.43) id 1EzYz9-0007sP-8H for guile-devel@m.gmane.org; Thu, 19 Jan 2006 13:33:52 +0100 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1EzXIO-0000qh-El for guile-devel@m.gmane.org; Thu, 19 Jan 2006 05:45:36 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1EzWRQ-0003vE-5V for guile-devel@gnu.org; Thu, 19 Jan 2006 04:50:53 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1EzWR8-0003ss-Ff for guile-devel@gnu.org; Thu, 19 Jan 2006 04:50:49 -0500 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1EzWHz-00039K-7D for guile-devel@gnu.org; Thu, 19 Jan 2006 04:41:07 -0500 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 1EzWLz-0004gp-Mf for guile-devel@gnu.org; Thu, 19 Jan 2006 04:45:16 -0500 Original-Received: by laas.laas.fr (8.13.1/8.13.4) with SMTP id k0J9cVXU016023; Thu, 19 Jan 2006 10:38:33 +0100 (CET) Original-To: Neil Jerram X-URL: http://www.laas.fr/~lcourtes/ X-Revolutionary-Date: 30 =?iso-8859-1?Q?Niv=F4se?= 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: Neil Jerram , guile-devel@gnu.org In-Reply-To: <87mzhti17e.fsf@ossau.uklinux.net> (Neil Jerram's message of "Wed, 18 Jan 2006 23:08:21 +0000") 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-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Developers list for Guile, the GNU extensibility library" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: guile-devel-bounces+guile-devel=m.gmane.org@gnu.org Errors-To: guile-devel-bounces+guile-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.lisp.guile.devel:5599 Archived-At: Neil Jerram writes: > Theoretically, perhaps. But if you accept the gist of my analysis, > that would be to build something that has nice clear semantics (catch) > on top of something that has rather awkward semantics (lazy-catch), > which doesn't seem sensible. Yes, but internally, there is necessarily some form of `lazy-catch', i.e., there is code that executes just after the exception was raised and just before the stack is unwound. So it seems that `catch' is just hiding this away. OTOH, you comments about the environment in which the `lazy-catch' handler gets run, the fact that it must not return, etc., make it clear why it deserves the qualification of "awkward semantics". ;-) > And for Guile (as a particular Scheme implementation) there is a > further reason against this, namely the runtime cost of call/cc. > catch in Guile is much more efficient than code using call/cc to do > the same thing. Agreed. > Actually it does; the `guard' syntax is pretty close to catch. Right, I had misunderstood `guard'. > (BTW, in connection with `guard', which was called `try' in the > original draft of SRFI 34, I came across this email in the discussion > archive: http://srfi.schemers.org/srfi-34/mail-archive/msg00013.html. > This email concludes: > > Robust and portable code should only use the "try" form. > > for reasons connected to how dynamic state is handled that I think are > similar to the reasoning in my analysis. > > If accepted, this conclusion leaves SRFI-34 incomplete, because > try/guard provides no way of running something in the context of the > original error.) Well, you still have `with-exception-handler', except that it must be used carefully. In the light of your comments, it looks like your patch is the way to go! Thanks, Ludovic. _______________________________________________ Guile-devel mailing list Guile-devel@gnu.org http://lists.gnu.org/mailman/listinfo/guile-devel