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: Elisp lexical-let Date: Fri, 24 Jul 2009 13:42:51 +0200 Message-ID: References: <4A661B73.4090706@domob.eu> <4A695DE1.4010500@domob.eu> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: ger.gmane.org 1248441049 13360 80.91.229.12 (24 Jul 2009 13:10:49 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Fri, 24 Jul 2009 13:10:49 +0000 (UTC) Cc: Ken Raeburn , guile-devel To: Daniel Kraft Original-X-From: guile-devel-bounces+guile-devel=m.gmane.org@gnu.org Fri Jul 24 15:10:41 2009 Return-path: Envelope-to: guile-devel@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1MUKXo-0004pa-CO for guile-devel@m.gmane.org; Fri, 24 Jul 2009 15:10:40 +0200 Original-Received: from localhost ([127.0.0.1]:34141 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1MUKXn-0000gW-LW for guile-devel@m.gmane.org; Fri, 24 Jul 2009 09:10:39 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1MUKVy-000095-JU for guile-devel@gnu.org; Fri, 24 Jul 2009 09:08:46 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1MUKVt-00006Z-KC for guile-devel@gnu.org; Fri, 24 Jul 2009 09:08:45 -0400 Original-Received: from [199.232.76.173] (port=54179 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1MUKVt-00006O-EU for guile-devel@gnu.org; Fri, 24 Jul 2009 09:08:41 -0400 Original-Received: from a-sasl-quonix.sasl.smtp.pobox.com ([208.72.237.25]:50576 helo=sasl.smtp.pobox.com) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1MUKFv-0004D3-PJ for guile-devel@gnu.org; Fri, 24 Jul 2009 08:52:11 -0400 Original-Received: from localhost.localdomain (unknown [127.0.0.1]) by a-sasl-quonix.sasl.smtp.pobox.com (Postfix) with ESMTP id 35514129C8; Fri, 24 Jul 2009 08:52:10 -0400 (EDT) Original-Received: from unquote (unknown [81.38.186.175]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by a-sasl-quonix.sasl.smtp.pobox.com (Postfix) with ESMTPSA id 3C6C4129C2; Fri, 24 Jul 2009 08:52:05 -0400 (EDT) In-Reply-To: <4A695DE1.4010500@domob.eu> (Daniel Kraft's message of "Fri, 24 Jul 2009 09:08:17 +0200") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.0.92 (gnu/linux) X-Pobox-Relay-ID: CD233E1E-7850-11DE-9D51-F699A5B33865-02397024!a-sasl-quonix.pobox.com X-detected-operating-system: by monty-python.gnu.org: Solaris 10 (beta) X-BeenThere: guile-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Developers list for Guile, the GNU extensibility library" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: guile-devel-bounces+guile-devel=m.gmane.org@gnu.org Errors-To: guile-devel-bounces+guile-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.lisp.guile.devel:8962 Archived-At: Hi Daniel, On Fri 24 Jul 2009 09:08, Daniel Kraft writes: >> It's actually fairly simple, imo. Alpha-equivalence says that >> (lexical-let ((x a)) x) is the same as (lexical-let ((y a)) y). (Note >> that this lexical-let corresponds to Scheme's let.) So your program is >> the same as: >> >>> (lexical-let ((y 2)) >>> y ; -> 2 >>> (foo) ; -> 1 >>> (setq y 3) >>> y ; -> 3 >>> (foo) ; -> 1 >>> (let ((x 4)) >>> x ; -> 4? >>> (foo) ; -> 4 >>> (setq x 5) >>> x ; -> 5 >>> (foo) ; -> 5 >>> ) ; end the let >>> y ; -> 3? >>> (foo) ; -> 4 >>> ) >>> x ; -> 4 >>> (foo) ; -> 4 > > Yes of course, my main question was how the inner let is handled, and > what dynamic values x will attain (the results of (foo)) -- and here's > this funny stuff that the inner let will be like lexical-let for those > variables already lexically bound. Wow, strange. What were they thinking. But if that's the deal, that's the deal... Andy -- http://wingolog.org/