From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Andy Wingo Newsgroups: gmane.lisp.guile.devel Subject: Re: Avoiding variable clashes Date: Wed, 13 Apr 2011 16:19:29 +0200 Message-ID: References: NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: dough.gmane.org 1302704403 24235 80.91.229.12 (13 Apr 2011 14:20:03 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Wed, 13 Apr 2011 14:20:03 +0000 (UTC) Cc: guile-devel To: Hans Aberg Original-X-From: guile-devel-bounces+guile-devel=m.gmane.org@gnu.org Wed Apr 13 16:19:54 2011 Return-path: Envelope-to: guile-devel@m.gmane.org Original-Received: from lists.gnu.org ([140.186.70.17]) by lo.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1QA0vA-0000Xe-7O for guile-devel@m.gmane.org; Wed, 13 Apr 2011 16:19:52 +0200 Original-Received: from localhost ([::1]:44923 helo=lists2.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QA0v9-0002m1-OH for guile-devel@m.gmane.org; Wed, 13 Apr 2011 10:19:51 -0400 Original-Received: from eggs.gnu.org ([140.186.70.92]:36681) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QA0up-0002TK-Bw for guile-devel@gnu.org; Wed, 13 Apr 2011 10:19:49 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1QA0uO-0004Gj-MM for guile-devel@gnu.org; Wed, 13 Apr 2011 10:19:31 -0400 Original-Received: from a-pb-sasl-sd.pobox.com ([64.74.157.62]:60347 helo=sasl.smtp.pobox.com) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QA0uO-0004Gf-K6 for guile-devel@gnu.org; Wed, 13 Apr 2011 10:19:04 -0400 Original-Received: from sasl.smtp.pobox.com (unknown [127.0.0.1]) by a-pb-sasl-sd.pobox.com (Postfix) with ESMTP id 60D734F0C; Wed, 13 Apr 2011 10:21:01 -0400 (EDT) DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=pobox.com; h=from:to:cc :subject:references:date:in-reply-to:message-id:mime-version :content-type; s=sasl; bh=QxHd3N/wUYzYEzj4xDE1Zx0yR8M=; b=ODsQD+ B/esy9+/Yqqy74+inYrEQkLa4sgyr+KZ9wrpdetW6vlsKwFCcH3RmKqa04CCpno3 v0Nyp0Yqvr37bsG/TwVA5YeWPcWJQKisgkmSQAn0ivHLSJsNuGuwVA4SshRaGDhW vl4FsDkbFNn0IAmxvxF4+1CFE/xv7Quthd1aw= DomainKey-Signature: a=rsa-sha1; c=nofws; d=pobox.com; h=from:to:cc :subject:references:date:in-reply-to:message-id:mime-version :content-type; q=dns; s=sasl; b=iH+U+JfiAxlV/jVqLz9Q5BtPHfb76GkQ ekV2U/bvnwWb4ZDi+xBl3ws/0X/0ULEH4Sc1O9aw+F5gu5q8JxWMObaay6LabHK0 veA2yNgX9jd/5JLFu5IVMyyQd8ipFZQujnKzMzGFqffpNG+5v1AUXF2a+a/wdMKF B3X48MN7DnY= Original-Received: from a-pb-sasl-sd.pobox.com (unknown [127.0.0.1]) by a-pb-sasl-sd.pobox.com (Postfix) with ESMTP id 4B5074F0A; Wed, 13 Apr 2011 10:20:59 -0400 (EDT) Original-Received: from unquote.localdomain (unknown [90.164.198.39]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by a-pb-sasl-sd.pobox.com (Postfix) with ESMTPSA id ABF894F09; Wed, 13 Apr 2011 10:20:57 -0400 (EDT) In-Reply-To: (Hans Aberg's message of "Wed, 13 Apr 2011 14:57:29 +0200") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.2 (gnu/linux) X-Pobox-Relay-ID: 40E47C92-65D9-11E0-9337-E8AB60295C12-02397024!a-pb-sasl-sd.pobox.com X-detected-operating-system: by eggs.gnu.org: Solaris 10 (beta) X-Received-From: 64.74.157.62 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:12234 Archived-At: On Wed 13 Apr 2011 14:57, Hans Aberg writes: > What method is Guile using to avoid substitution variable clashes (de > Bruijn numbers, combinators, etc.)? Each lexical variable is given a fresh name (a gensym) when it is introduced. The expander keeps an environment as to what name maps to what gensym, and residualizes the gensym in the lexical reference or assignment. See "The Scheme Compiler" in the manual, for more. Andy -- http://wingolog.org/