From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: Marius Vollmer Newsgroups: gmane.lisp.guile.devel Subject: Re: macros, procedure->macro Date: 14 Jul 2002 18:26:12 +0200 Sender: guile-devel-admin@gnu.org Message-ID: <87fzymff8b.fsf@zagadka.ping.de> References: <200207122236.56581.unknown_lamer@unknownlamer.org> NNTP-Posting-Host: localhost.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: main.gmane.org 1026663998 24139 127.0.0.1 (14 Jul 2002 16:26:38 GMT) X-Complaints-To: usenet@main.gmane.org NNTP-Posting-Date: Sun, 14 Jul 2002 16:26:38 +0000 (UTC) Cc: Clinton Ebadi , Dirk Herrmann , guile-devel@gnu.org, guile-user@gnu.org Return-path: Original-Received: from fencepost.gnu.org ([199.232.76.164]) by main.gmane.org with esmtp (Exim 3.33 #1 (Debian)) id 17TmCi-0006HE-00 for ; Sun, 14 Jul 2002 18:26:36 +0200 Original-Received: from localhost ([127.0.0.1] helo=fencepost.gnu.org) by fencepost.gnu.org with esmtp (Exim 3.35 #1 (Debian)) id 17TmDK-00087c-00; Sun, 14 Jul 2002 12:27:14 -0400 Original-Received: from dialin.speedway42.dip73.dokom.de ([195.138.42.73] helo=zagadka.ping.de) by fencepost.gnu.org with smtp (Exim 3.35 #1 (Debian)) id 17TmCM-00086c-00 for ; Sun, 14 Jul 2002 12:26:14 -0400 Original-Received: (qmail 851 invoked by uid 1000); 14 Jul 2002 16:26:12 -0000 Original-To: Neil Jerram In-Reply-To: Original-Lines: 36 User-Agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.2 Errors-To: guile-devel-admin@gnu.org X-BeenThere: guile-devel@gnu.org X-Mailman-Version: 2.0.11 Precedence: bulk List-Help: List-Post: List-Subscribe: , List-Id: Developers list for Guile, the GNU extensibility library List-Unsubscribe: , List-Archive: Xref: main.gmane.org gmane.lisp.guile.devel:794 X-Report-Spam: http://spam.gmane.org/gmane.lisp.guile.devel:794 Neil Jerram 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