From: Kjetil Svalastog Matheussen <k.s.matheussen@notam02.no>
Cc: guile-user@gnu.org, Neil Jerram <neil@ossau.uklinux.net>,
Kjetil Svalastog Matheussen <k.s.matheussen@notam02.no>
Subject: Re: Order of the evaluation of elements in a quasiquote list.
Date: Sun, 3 Apr 2005 14:09:15 +0200 (CEST) [thread overview]
Message-ID: <Pine.LNX.4.58.0504031404000.14353@notam02.uio.no> (raw)
In-Reply-To: <20050403115906.GC7630@seid-online.de>
On Sun, 3 Apr 2005 rm@fabula.de wrote:
> 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" ?)
It just feels more logical, left to right, top to bottom.
Thanks for the information, I had a small hope
that this was a bug in guile, or that the behaviour could be
changed with a switch. I'll fix up my code.
--
_______________________________________________
Guile-user mailing list
Guile-user@gnu.org
http://lists.gnu.org/mailman/listinfo/guile-user
next prev parent reply other threads:[~2005-04-03 12:09 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-04-02 18:52 Order of the evaluation of elements in a quasiquote list Kjetil Svalastog Matheussen
2005-04-03 9:11 ` Neil Jerram
2005-04-03 11:38 ` Kjetil Svalastog Matheussen
2005-04-03 11:59 ` rm
2005-04-03 12:09 ` Kjetil Svalastog Matheussen [this message]
2005-04-03 13:01 ` Geoffrey Knauth
[not found] <cmu-lmtpd-25765-1112693521-1@mail-imap5.uio.no>
2005-04-05 14:23 ` Kjetil Svalastog Matheussen
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.gnu.org/software/guile/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=Pine.LNX.4.58.0504031404000.14353@notam02.uio.no \
--to=k.s.matheussen@notam02.no \
--cc=guile-user@gnu.org \
--cc=neil@ossau.uklinux.net \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).