From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Ian Grant Newsgroups: gmane.lisp.guile.devel Subject: Re: scm_c_catch question Date: Mon, 15 Sep 2014 17:17:43 -0400 Message-ID: NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: multipart/alternative; boundary=f46d043d6729633aaa0503212acd X-Trace: ger.gmane.org 1410815882 15783 80.91.229.3 (15 Sep 2014 21:18:02 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Mon, 15 Sep 2014 21:18:02 +0000 (UTC) To: Ian Grant , guile-devel Original-X-From: guile-devel-bounces+guile-devel=m.gmane.org@gnu.org Mon Sep 15 23:17:55 2014 Return-path: Envelope-to: guile-devel@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1XTdek-0005Zl-9Q for guile-devel@m.gmane.org; Mon, 15 Sep 2014 23:17:54 +0200 Original-Received: from localhost ([::1]:34053 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XTdej-0003nZ-C0 for guile-devel@m.gmane.org; Mon, 15 Sep 2014 17:17:53 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:58002) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XTdee-0003nU-NX for guile-devel@gnu.org; Mon, 15 Sep 2014 17:17:50 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1XTded-0005gX-Eh for guile-devel@gnu.org; Mon, 15 Sep 2014 17:17:48 -0400 Original-Received: from mail-wi0-x229.google.com ([2a00:1450:400c:c05::229]:56210) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XTded-0005gH-8C for guile-devel@gnu.org; Mon, 15 Sep 2014 17:17:47 -0400 Original-Received: by mail-wi0-f169.google.com with SMTP id cc10so3015506wib.0 for ; Mon, 15 Sep 2014 14:17:43 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlemail.com; s=20120113; h=mime-version:date:message-id:subject:from:to:content-type; bh=E+DZvcLoNsY3m+8BvWlY2gVXG/QKQWnIyPdA0CazIZY=; b=UYsOTn4pI0bTMAlv08nactvzu16kDz/sIisTtIo9o54TbSsfHz9TaKYUQMRgIQPWGQ q6kcbaDgH3eE4RDRljoUUmBOY5GJy/2d1mpFKbtRdbhHIX4+iy91tqVcMtFF/nxjvQxI MJBVm3lwjGNIrWgdlgZoSGKnvorBm8GF0aN8dilSmADyDbsAIUjIyyUDhyx9IKuF4R64 vehjPuLTqIlr4rA5/tFe/4tHDrGq2W81OmcIpxOcUOOhidb7QwrpfW0WRq4/N3Wi9OGH JLfGwAuz2KclFeNtvnCz1cO+8YIL/+68d3iIZnRydpdckG9tj2XGEBAGtpW5UrXt98qC BxRw== X-Received: by 10.180.72.239 with SMTP id g15mr27004728wiv.47.1410815863501; Mon, 15 Sep 2014 14:17:43 -0700 (PDT) Original-Received: by 10.194.81.194 with HTTP; Mon, 15 Sep 2014 14:17:43 -0700 (PDT) X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address (bad octet value). X-Received-From: 2a00:1450:400c:c05::229 X-BeenThere: guile-devel@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "Developers list for Guile, the GNU extensibility library" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guile-devel-bounces+guile-devel=m.gmane.org@gnu.org Original-Sender: guile-devel-bounces+guile-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.lisp.guile.devel:17457 Archived-At: --f46d043d6729633aaa0503212acd Content-Type: text/plain; charset=UTF-8 A while ago I posted this patch: http://lists.gnu.org/archive/html/guile-devel/2014-08/msg00058.html No-one had anything to say about it. But I would like to know what to do if I want my code to work with the next release of Guile. I think in retrospect this patch is too much. A better patch would leave the API alone, and just remove the existing check for the current throw handlers, and make the documentation clearer about exactly what "the dynamic context of the throw" really means. If the catcher wants to 'fall through' to the main handler from the pre-unwind-handler, then she can just return from the pre-unwind-handler. So what is the function this check provides? If we remove the check, then the dynamic context of the throw, in which the pre-unwind-handler is called, includes the throw-handlers in effect at the time of the throw., So if you throw the same exception from within the pre-unwind-handler, you re-enter it. What I am proposing is a change to the actual semantics implemented, but it is arguably not a change to the semantics documented. Or have I missed the clearer definition somewhere else in the manual of what "the dynamic context of the throw" means, and which makes it clear that this is everything but the throw handlers in effect at the time?! Ian --f46d043d6729633aaa0503212acd Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable
A while ago I posted this patch:

=C2= =A0=C2=A0 http://lists.gnu.org/archive/html/guile-de= vel/2014-08/msg00058.html

No-one had anything to say about= it. But I would like to know what to do if I want my code to work with the= next release of Guile.

I think in retrospect this patch is to= o much. A better patch would leave the API alone, and just remove the exis= ting check for the current throw handlers, and make the documentation clear= er about exactly what "the dynamic context of the throw" really m= eans.

If the catcher wants to 'fall through' to the main ha= ndler from the pre-unwind-handler, then she can just return from the pre-un= wind-handler. So what is the function this check provides?

If we re= move the check, then the dynamic context of the throw, in which the pre-unw= ind-handler is called, includes the throw-handlers in effect at the time of= the throw., So if you throw the same exception from within the pre-unwind-= handler, you re-enter it.

What I am proposing is a change to the act= ual semantics implemented, but it is arguably not a change to the semantics= documented. Or have I missed the clearer definition somewhere else in the = manual of what "the dynamic context of the throw" means, and whic= h makes it clear that this is everything but the throw handlers in effect a= t the time?!

Ian



--f46d043d6729633aaa0503212acd--