From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: "John W. Eaton" Newsgroups: gmane.lisp.guile.user Subject: Re: loop translations (was: Re: language translator help) Date: Sun, 28 Apr 2002 09:29:53 -0500 Sender: guile-user-admin@gnu.org Message-ID: <15564.1889.327611.808226@segfault.bogus.domain> References: <15561.38014.967466.255795@segfault.bogus.domain> <15563.18445.371647.751605@segfault.bogus.domain> <87adrondbl.fsf@zagadka.ping.de> NNTP-Posting-Host: localhost.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Trace: main.gmane.org 1020004250 4673 127.0.0.1 (28 Apr 2002 14:30:50 GMT) X-Complaints-To: usenet@main.gmane.org NNTP-Posting-Date: Sun, 28 Apr 2002 14:30:50 +0000 (UTC) Cc: guile-user Return-path: Original-Received: from fencepost.gnu.org ([199.232.76.164]) by main.gmane.org with esmtp (Exim 3.33 #1 (Debian)) id 171phR-0001DG-00 for ; Sun, 28 Apr 2002 16:30:50 +0200 Original-Received: from localhost ([127.0.0.1] helo=fencepost.gnu.org) by fencepost.gnu.org with esmtp (Exim 3.34 #1 (Debian)) id 171pgy-0001SM-00; Sun, 28 Apr 2002 10:30:20 -0400 Original-Received: from bevo.che.wisc.edu ([128.104.177.141]) by fencepost.gnu.org with esmtp (Exim 3.34 #1 (Debian)) id 171pgb-0001Nk-00 for ; Sun, 28 Apr 2002 10:29:57 -0400 Original-Received: from segfault.bogus.domain (12-221-96-229.client.insightBB.com [12.221.96.229]) by bevo.che.wisc.edu (8.12.1/8.12.1/Debian -5) with ESMTP id g3SETtZo028713; Sun, 28 Apr 2002 09:29:56 -0500 Original-Received: from segfault.bogus.domain (localhost [127.0.0.1]) by segfault.bogus.domain (8.12.2/8.12.2/Debian -5) with ESMTP id g3SETscv007545; Sun, 28 Apr 2002 09:29:54 -0500 Original-Received: (from jwe@localhost) by segfault.bogus.domain (8.12.2/8.12.2/Debian -5) id g3SETr2q007542; Sun, 28 Apr 2002 09:29:53 -0500 Original-To: Marius Vollmer In-Reply-To: <87adrondbl.fsf@zagadka.ping.de> X-Mailer: VM 7.04 under Emacs 20.7.2 Errors-To: guile-user-admin@gnu.org X-BeenThere: guile-user@gnu.org X-Mailman-Version: 2.0.9 Precedence: bulk List-Help: List-Post: List-Subscribe: , List-Id: General Guile related discussions List-Unsubscribe: , List-Archive: Xref: main.gmane.org gmane.lisp.guile.user:343 X-Report-Spam: http://spam.gmane.org/gmane.lisp.guile.user:343 On 28-Apr-2002, Marius Vollmer wrote: | "John W. Eaton" writes: | | Your approach is essentially right. Let me try to formalize it a bit | with some macros: Thanks. With the macros, the loops are much more readable to me, but there is still the (apparent, at least to a Scheme novice) complexity of call/cc. | The functions created by '(let loop ...)' are totally ordinary functions | and calling them in a non-tail context will 'push stack' and they will | eventually return to the caller. OK, I thought that might be the case. But I didn't see the way to use call/cc to jump to the end of the loop and keep going. | The problem with the macros above is that they are not hygienic, Sorry, I'm not sure I understand what that means. | avoiding call/cc is not so easy and is hopefully | not really necessary. One could generate continuation-passing code | and hope that Guile will execute it more efficiently than the | occasional call/cc, What is continuation passing? | or one could implement a cheaper version of | call/cc that is not as powerful but is sufficient for 'with-exit'. I | think we should do the latter, if performance of call/cc turns out to | be too bad. It's important to me that looping not be any slower than it already is in Octave. It might be possible to scan loops for break/continue statements and generate simpler loops when they are not present, but I'd really rather avoid that if possible. It would be much better if break and continue statements did not generate a large performance penalty. jwe _______________________________________________ Guile-user mailing list Guile-user@gnu.org http://mail.gnu.org/mailman/listinfo/guile-user