From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: Neil Jerram Newsgroups: gmane.lisp.guile.devel Subject: Re: SRFI 34 Date: 17 May 2003 10:39:22 +0100 Sender: guile-devel-bounces+guile-devel=m.gmane.org@gnu.org Message-ID: References: <20030225093608.6a8935f8.dsmith@altustech.com> <87of228kq3.fsf@zagadka.ping.de> NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: main.gmane.org 1053164399 2128 80.91.224.249 (17 May 2003 09:39:59 GMT) X-Complaints-To: usenet@main.gmane.org NNTP-Posting-Date: Sat, 17 May 2003 09:39:59 +0000 (UTC) Cc: djurfeldt@nada.kth.se Original-X-From: guile-devel-bounces+guile-devel=m.gmane.org@gnu.org Sat May 17 11:39:57 2003 Return-path: Original-Received: from monty-python.gnu.org ([199.232.76.173]) by main.gmane.org with esmtp (Exim 3.35 #1 (Debian)) id 19GyAX-0000YB-00 for ; Sat, 17 May 2003 11:39:57 +0200 Original-Received: from localhost ([127.0.0.1] helo=monty-python.gnu.org) by monty-python.gnu.org with esmtp (Exim 4.10.13) id 19GyBl-0007OI-01 for guile-devel@m.gmane.org; Sat, 17 May 2003 05:41:13 -0400 Original-Received: from list by monty-python.gnu.org with tmda-scanned (Exim 4.10.13) id 19GyBJ-0007Ck-00 for guile-devel@gnu.org; Sat, 17 May 2003 05:40:45 -0400 Original-Received: from mail by monty-python.gnu.org with spam-scanned (Exim 4.10.13) id 19GyBE-0006uP-00 for guile-devel@gnu.org; Sat, 17 May 2003 05:40:42 -0400 Original-Received: from mail.uklinux.net ([80.84.72.21] helo=s1.uklinux.net) by monty-python.gnu.org with esmtp (Exim 4.10.13) id 19GyBD-0006od-00 for guile-devel@gnu.org; Sat, 17 May 2003 05:40:39 -0400 Original-Received: from laruns.ossau.uklinux.net (bts-0740.dialup.zetnet.co.uk [194.247.50.228]) by s1.uklinux.net (8.11.6p2/8.11.6) with ESMTP id h4H9eaJ25442; Sat, 17 May 2003 10:40:37 +0100 Original-Received: from laruns.ossau.uklinux.net.ossau.uklinux.net (localhost [127.0.0.1])ESMTP id 5D8E7DC4D4; Sat, 17 May 2003 10:39:23 +0100 (BST) Original-To: Marius Vollmer In-Reply-To: <87of228kq3.fsf@zagadka.ping.de> Original-Lines: 40 User-Agent: Gnus/5.0808 (Gnus v5.8.8) Emacs/20.7 Original-cc: guile-devel@gnu.org X-BeenThere: guile-devel@gnu.org X-Mailman-Version: 2.1b5 Precedence: list List-Id: Developers list for Guile, the GNU extensibility library List-Help: List-Post: List-Subscribe: , List-Archive: List-Unsubscribe: , Errors-To: guile-devel-bounces+guile-devel=m.gmane.org@gnu.org Xref: main.gmane.org gmane.lisp.guile.devel:2385 X-Report-Spam: http://spam.gmane.org/gmane.lisp.guile.devel:2385 >>>>> "Marius" == Marius Vollmer writes: Marius> Neil Jerram writes: >> As part of "looking", I've written and committed a first >> implementation of SRFI 34. Marius> Nice! I think I like SRFI 34. Just the essential bits... Marius> Anyway, I sense trouble with our lazy-catch: guile> (define f (make-fluid)) guile> (lazy-catch #t (lambda () Marius> (with-fluids ((f 12)) Marius> (throw 'x))) Marius> (lambda (x) Marius> (pk 'handler (fluid-ref f)))) Marius> ;;; (handler #f) Marius> Shouldn't this print '(handler 12)' since the handler is Marius> supposed to be running in the dynamic context of the Marius> throw? Our lazy-catch implementation specifically unwinds dynamic context so that we see (handler #f) here rather than (handler 12). Effectively the only thing that lazy-catch doesn't unwind is the stack. I've described this current behaviour in some detail in the manual. Unwinding the fluid context is contrary to my intuition, though, and it appears to yours also. So perhaps we should consider changing it. Right now, fluids, dynamic winds and catches are all on the same wind list, which means we have to unwind the list to get the right catch context for the lazy-catch handler's throw. One option then would be to have separate wind lists for separate kinds of dynamic context, and only unwind the list with the catches in it. But I wonder if there are strong theoretical reasons why having separate wind lists would be a bad thing? Neil _______________________________________________ Guile-devel mailing list Guile-devel@gnu.org http://mail.gnu.org/mailman/listinfo/guile-devel