From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: Marius Vollmer Newsgroups: gmane.lisp.guile.user Subject: Re: macros, procedure->macro Date: 14 Jul 2002 18:26:12 +0200 Sender: guile-user-admin@gnu.org Message-ID: 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 1026664041 24205 127.0.0.1 (14 Jul 2002 16:27:21 GMT) X-Complaints-To: usenet@main.gmane.org NNTP-Posting-Date: Sun, 14 Jul 2002 16:27:21 +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 17TmDQ-0006II-00 for ; Sun, 14 Jul 2002 18:27:20 +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 17TmDG-00087K-00; Sun, 14 Jul 2002 12:27:10 -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-00086b-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-user-admin@gnu.org X-BeenThere: guile-user@gnu.org X-Mailman-Version: 2.0.11 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:746 X-Report-Spam: http://spam.gmane.org/gmane.lisp.guile.user:746 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-user mailing list Guile-user@gnu.org http://mail.gnu.org/mailman/listinfo/guile-user