unofficial mirror of guile-devel@gnu.org 
 help / color / mirror / Atom feed
From: Marius Vollmer <mvo@zagadka.ping.de>
Cc: Clinton Ebadi <unknown_lamer@unknownlamer.org>,
	Dirk Herrmann <dirk@sallust.ida.ing.tu-bs.de>,
	guile-devel@gnu.org, guile-user@gnu.org
Subject: Re: macros, procedure->macro
Date: 14 Jul 2002 18:26:12 +0200	[thread overview]
Message-ID: <87fzymff8b.fsf@zagadka.ping.de> (raw)
In-Reply-To: <m3r8i65o6a.fsf@laruns.ossau.uklinux.net>

Neil Jerram <neil@ossau.uklinux.net> writes:

> Thanks for pointing this out.  However, r5rs are by definition
> hygienic, one of the corollaries of which (if I understand correctly)
> is that it makes no difference when or how many times macros are
> expanded.

It does make a difference when we also consider redefinitions, and
definitions textually after the first use.  I.e., which definition of
bar is used in the following example?

    (define-syntax bar ...)
    (define (foo) (bar))
    (define-syntax bar ...)

> With r5rs macros, therefore, we can easily delay expansion as late as
> possible (e.g. immediately before evaluation) so as to support all
> kinds of recursive references.

I think it is more important to give us leeway to perform macro
expansion as early as possible, to make life easy for compilers.

> With non-hygienic macros, timing matters.  So, if Guile wants to
> support non-hygienic macros at all (in addition to r5rs), it's
> important to be precise about when they are expanded.

Another option would be to not be precise and just expect macro
writers to code their macros in such a way that they don't depend on a
the exact behavior of the implementation.  This might even be
desirable, to encourage people to write portable code.

The conservative assumption is that macros are expanded once, in a
environment that is totally different from the run-time environment.

But, of course, precisely specifying our implementation works is also
a good thing.

_______________________________________________
Guile-devel mailing list
Guile-devel@gnu.org
http://mail.gnu.org/mailman/listinfo/guile-devel


  reply	other threads:[~2002-07-14 16:26 UTC|newest]

Thread overview: 36+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2002-07-01 19:56 macros, procedure->macro Dirk Herrmann
2002-07-01 21:30 ` Rob Browning
2002-07-03 20:24   ` Dirk Herrmann
2002-07-01 22:14 ` Marius Vollmer
2002-07-03 20:11   ` Dirk Herrmann
2002-07-07 17:54     ` Marius Vollmer
2002-07-08 20:31       ` Dirk Herrmann
2002-07-09 18:22         ` Marius Vollmer
2002-07-10  5:21           ` Dirk Herrmann
2002-07-10 19:31             ` Marius Vollmer
2002-07-10 19:57               ` Dirk Herrmann
2002-07-10 20:08                 ` Marius Vollmer
2002-07-01 22:17 ` Gary Houston
2002-07-09 21:16 ` Neil Jerram
2002-07-10  5:46   ` Dirk Herrmann
2002-07-10 10:15     ` Neil Jerram
2002-07-10 20:03       ` Dirk Herrmann
2002-07-13  0:09         ` Neil Jerram
2002-07-13  2:36           ` Clinton Ebadi
2002-07-14 15:23             ` Neil Jerram
2002-07-14 16:26               ` Marius Vollmer [this message]
2002-07-15  6:03                 ` Rob Browning
2002-07-13  6:53           ` Dirk Herrmann
2002-07-14 15:23             ` Neil Jerram
     [not found] <200207012220.PAA08054@onyx.he.net>
2002-07-03 20:08 ` Dirk Herrmann
2002-07-04 20:16   ` Dirk Herrmann
2002-07-07 18:15     ` Marius Vollmer
     [not found] <87n0t376c9.fsf@zagadka.ping.de>
2002-07-08 20:23 ` Dirk Herrmann
2002-07-09 18:13   ` Marius Vollmer
2002-07-10 21:54 ` Dirk Herrmann
2002-07-13  9:53   ` Dirk Herrmann
2002-07-13 18:38     ` Marius Vollmer
     [not found] <m3lm8e5o69.fsf@laruns.ossau.uklinux.net>
2002-07-14 21:35 ` Dirk Herrmann
2002-07-15 20:48   ` Marius Vollmer
2002-07-15 22:42   ` Neil Jerram
2002-07-16 22:00     ` Dirk Herrmann

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=87fzymff8b.fsf@zagadka.ping.de \
    --to=mvo@zagadka.ping.de \
    --cc=dirk@sallust.ida.ing.tu-bs.de \
    --cc=guile-devel@gnu.org \
    --cc=guile-user@gnu.org \
    --cc=unknown_lamer@unknownlamer.org \
    /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).