From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: ludo@gnu.org (Ludovic =?iso-8859-1?Q?Court=E8s?=) Newsgroups: gmane.lisp.guile.devel,gmane.comp.lang.racket.devel Subject: Re: [racket-dev] Enhancement to the syntax system? Date: Tue, 10 Jul 2012 17:26:24 +0200 Message-ID: <87a9z7tz6n.fsf@gnu.org> References: <877gumufmq.fsf@gnu.org> <87r4stss4d.fsf@gnu.org> <878vf0o7gs.fsf@gnu.org> <87pq85dj8o.fsf@gnu.org> <87sjd058ia.fsf@gnu.org> <4FFC3D72.8070506@gentoo.org> <20476.16781.257276.194149@winooski.ccs.neu.edu> <20120710150315.B7B27650059@mail-svr1.cs.utah.edu> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Trace: dough.gmane.org 1341934019 11341 80.91.229.3 (10 Jul 2012 15:26:59 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Tue, 10 Jul 2012 15:26:59 +0000 (UTC) Cc: "dev@racket-lang.org" , Eli Barzilay , guile-devel@gnu.org To: Matthew Flatt Original-X-From: guile-devel-bounces+guile-devel=m.gmane.org@gnu.org Tue Jul 10 17:26:53 2012 Return-path: Envelope-to: guile-devel@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1SocKm-0003zk-Rf for guile-devel@m.gmane.org; Tue, 10 Jul 2012 17:26:40 +0200 Original-Received: from localhost ([::1]:53624 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SocKl-0001TY-Su for guile-devel@m.gmane.org; Tue, 10 Jul 2012 11:26:39 -0400 Original-Received: from eggs.gnu.org ([208.118.235.92]:36127) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SocKe-0001Ci-Uh for guile-devel@gnu.org; Tue, 10 Jul 2012 11:26:38 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1SocKY-0006tF-N8 for guile-devel@gnu.org; Tue, 10 Jul 2012 11:26:32 -0400 Original-Received: from xanadu.aquilenet.fr ([88.191.123.111]:50926) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SocKY-0006t3-Gq for guile-devel@gnu.org; Tue, 10 Jul 2012 11:26:26 -0400 Original-Received: from localhost (localhost [127.0.0.1]) by xanadu.aquilenet.fr (Postfix) with ESMTP id 5FFFA1C10D; Tue, 10 Jul 2012 17:26:26 +0200 (CEST) Original-Received: from xanadu.aquilenet.fr ([127.0.0.1]) by localhost (xanadu.aquilenet.fr [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id k9knKsRfzBTl; Tue, 10 Jul 2012 17:26:26 +0200 (CEST) Original-Received: from pluto (vpn-konference.ms.mff.cuni.cz [195.113.20.101]) by xanadu.aquilenet.fr (Postfix) with ESMTPSA id A199D1C10C; Tue, 10 Jul 2012 17:26:25 +0200 (CEST) X-URL: http://www.fdn.fr/~lcourtes/ X-Revolutionary-Date: 23 Messidor an 220 de la =?iso-8859-1?Q?R=E9volution?= X-PGP-Key-ID: 0xEA52ECF4 X-PGP-Key: http://www.fdn.fr/~lcourtes/ludovic.asc X-PGP-Fingerprint: 83C4 F8E5 10A3 3B4C 5BEA D15D 77DD 95E2 EA52 ECF4 X-OS: x86_64-unknown-linux-gnu In-Reply-To: <20120710150315.B7B27650059@mail-svr1.cs.utah.edu> (Matthew Flatt's message of "Tue, 10 Jul 2012 09:03:14 -0600") User-Agent: Gnus/5.130005 (Ma Gnus v0.5) Emacs/24.1 (gnu/linux) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 3) X-Received-From: 88.191.123.111 X-BeenThere: guile-devel@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "Developers list for Guile, the GNU extensibility library" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guile-devel-bounces+guile-devel=m.gmane.org@gnu.org Original-Sender: guile-devel-bounces+guile-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.lisp.guile.devel:14731 gmane.comp.lang.racket.devel:6399 Archived-At: Hi, Matthew Flatt skribis: > It's natural --- but not correct --- to think that #` is responsible > for hygiene, in which case `(f #'x)' should keep the given `x' separate > from the `let'-bound `x' in the result. [...] > If you change the example to > > #lang racket > (begin-for-syntax=20 > (define-syntax-rule (f body) > #`(let ([x 1]) body))) > (define-syntax (m stx) > (with-syntax ([zz (f x)]) #`(let ([x 2]) zz))) > (m) > > so that `f' is used as a macro instead of a function, then you get 2, > since the macro-expansion of `(f x)' keeps the `x's separate. Interesting. Thanks for the clarification and examples. Ludo=E2=80=99.