From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: rm@fabula.de Newsgroups: gmane.lisp.guile.user Subject: Re: Order of the evaluation of elements in a quasiquote list. Date: Sun, 3 Apr 2005 13:59:06 +0200 Message-ID: <20050403115906.GC7630@seid-online.de> References: <424FB34D.6040304@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 1112529899 32531 80.91.229.2 (3 Apr 2005 12:04:59 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Sun, 3 Apr 2005 12:04:59 +0000 (UTC) Cc: guile-user@gnu.org, Neil Jerram Original-X-From: guile-user-bounces+guile-user=m.gmane.org@gnu.org Sun Apr 03 14:04:57 2005 Return-path: Original-Received: from lists.gnu.org ([199.232.76.165]) by ciao.gmane.org with esmtp (Exim 4.43) id 1DI3qN-0002Ta-Iv for guile-user@m.gmane.org; Sun, 03 Apr 2005 14:04:43 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1DI3s1-0007Sx-Ej for guile-user@m.gmane.org; Sun, 03 Apr 2005 08:06:25 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1DI3pu-0006Qz-9F for guile-user@gnu.org; Sun, 03 Apr 2005 08:04:14 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1DI3po-0006OE-Vx for guile-user@gnu.org; Sun, 03 Apr 2005 08:04:09 -0400 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1DI3po-0006MM-Lt for guile-user@gnu.org; Sun, 03 Apr 2005 08:04:08 -0400 Original-Received: from [217.22.192.104] (helo=www.elogos.de) by monty-python.gnu.org with esmtp (Exim 4.34) id 1DI3lL-0000wf-2c for guile-user@gnu.org; Sun, 03 Apr 2005 07:59:31 -0400 Original-Received: by www.elogos.de (Postfix, from userid 5001) id B1F3114CB3; Sun, 3 Apr 2005 13:59:06 +0200 (CEST) Original-To: Kjetil Svalastog Matheussen Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.3i 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:4335 X-Report-Spam: http://spam.gmane.org/gmane.lisp.guile.user:4335 On Sun, Apr 03, 2005 at 01:38:04PM +0200, Kjetil Svalastog Matheussen wrote: > On Sun, 3 Apr 2005, Neil Jerram wrote: > > > Kjetil Svalastog Matheussen wrote: > > > Hi, I have recently stumbled upon various bugs in my code > > > because the order of the evaluation of the elements in a quasiquote > > > list changes. > > > > Changes how? Can you give us an example, to make things concrete? > > > > Sorry, this is the stripped down version of the cause of the bug I'm > finding various places: > > (let ((a 1)) > `( ,(begin (set! a 2) a) > ,a)) > -> (2 1) > > > Wouldn't it be better if this one returned (2 2)? Why do you think that "(2 2)" would be _better_? (How do you define "better" ?) > Also, I'm seeing different behaviour in the order of evaluation between > 1.6.4 and 1.7 (doesn't have the code available now). I think that is > really bad actually... You get what you ask for: did you do a "manual" expand of your code? This result in the following form: (list (begin (set! a 2) a) a) => (list 2 1) | (list 2 2) depending on the order of evaluation of function arguments, and, please, since you read c.l.scheme: there's not to be argued about here :-/ So guile changed the order of evaluation for function arguments - that's not good or bad. There is no reason why the implementors shouldn't do this, after all, that's the whole point of leaving evaluation order unspecified (so implementors can safely do this). hth Ralf Mattes > -- > > > > _______________________________________________ > Guile-user mailing list > Guile-user@gnu.org > http://lists.gnu.org/mailman/listinfo/guile-user _______________________________________________ Guile-user mailing list Guile-user@gnu.org http://lists.gnu.org/mailman/listinfo/guile-user