From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: "Neil Jerram" Newsgroups: gmane.lisp.guile.user Subject: Re: Closure? Date: Sat, 12 Jul 2008 23:43:43 +0100 Message-ID: <49dd78620807121543l3de15e61lc5777c6bd2b628f1@mail.gmail.com> References: NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-Trace: ger.gmane.org 1215902640 981 80.91.229.12 (12 Jul 2008 22:44:00 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sat, 12 Jul 2008 22:44:00 +0000 (UTC) Cc: guile-user@gnu.org To: "Kjetil S. Matheussen" Original-X-From: guile-user-bounces+guile-user=m.gmane.org@gnu.org Sun Jul 13 00:44:48 2008 Return-path: Envelope-to: guile-user@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1KHnpf-0003Sn-B1 for guile-user@m.gmane.org; Sun, 13 Jul 2008 00:44:47 +0200 Original-Received: from localhost ([127.0.0.1]:47561 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1KHnon-00070n-A3 for guile-user@m.gmane.org; Sat, 12 Jul 2008 18:43:53 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1KHnoh-0006wA-7e for guile-user@gnu.org; Sat, 12 Jul 2008 18:43:47 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1KHnof-0006tV-ML for guile-user@gnu.org; Sat, 12 Jul 2008 18:43:46 -0400 Original-Received: from [199.232.76.173] (port=52736 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1KHnof-0006tK-JZ for guile-user@gnu.org; Sat, 12 Jul 2008 18:43:45 -0400 Original-Received: from wa-out-1112.google.com ([209.85.146.180]:33074) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1KHnof-0006lq-5f for guile-user@gnu.org; Sat, 12 Jul 2008 18:43:45 -0400 Original-Received: by wa-out-1112.google.com with SMTP id m34so2626143wag.10 for ; Sat, 12 Jul 2008 15:43:43 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlemail.com; s=gamma; h=domainkey-signature:received:received:message-id:date:from:to :subject:cc:in-reply-to:mime-version:content-type :content-transfer-encoding:content-disposition:references; bh=tTgwI8xcFqrxIOzBCbG+op5dVG72nj11UzCL4KjDqWg=; b=TOw9CQuZbDyYuo0AyYRgpLb9SM1AFmGpnCj1bhDQmJdEG/7pMpiryPcUk/pZGlaWnF OsDAf67r/Oj4Ghc2ueQpyE1Zor1vfxehikh4xGchowRm01Rpm5Px6DR6VGysvO24jHgd /7ANfdtC0gzkwLMZ21ja78WdyMjiAk0acn9BE= DomainKey-Signature: a=rsa-sha1; c=nofws; d=googlemail.com; s=gamma; h=message-id:date:from:to:subject:cc:in-reply-to:mime-version :content-type:content-transfer-encoding:content-disposition :references; b=qb6PuGmHx/yF6QSe4rKnzJoxJAWyVeA0KFBeXsbt+9lBhoz7DxSvQNmzGAbIKsqXOs Pk7oecMWEFXRWGseY5Hg9ULMHP0F1JST2YTLHtzhXkIvSEXUhRVRD3Fd3hOyjBisNA86 UtqXXB/8Q652bMsoAUEJEGszKP7n3ZnoykTeg= Original-Received: by 10.114.181.1 with SMTP id d1mr15952387waf.3.1215902623500; Sat, 12 Jul 2008 15:43:43 -0700 (PDT) Original-Received: by 10.114.197.8 with HTTP; Sat, 12 Jul 2008 15:43:43 -0700 (PDT) In-Reply-To: Content-Disposition: inline X-detected-kernel: by monty-python.gnu.org: Linux 2.6 (newer, 2) X-BeenThere: guile-user@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: General Guile related discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: guile-user-bounces+guile-user=m.gmane.org@gnu.org Errors-To: guile-user-bounces+guile-user=m.gmane.org@gnu.org Xref: news.gmane.org gmane.lisp.guile.user:6647 Archived-At: 2008/7/11 Kjetil S. Matheussen : > > On Fri, 11 Jul 2008, Kjetil S. Matheussen wrote: > >> Ludovic Court?s: >> > >> > guile> ((lambda (a b) (the-environment)) 2 3) >> > (((a b) 2 3) #) >> > >> > But don't do that, since the representation of environments could >> > eventually change. > Sorry, I misunderstood. What I ment is that (the-environment) > etc. is what makes Guile special. I hope there is no > plans to remove all that. I agree. I can't see a reason why we might want to remove `the-environment' and `local-eval', even if Guile's internal representation of environments changes, because the ideas that there _is_ a lexical environment inside a lambda (or a let ...), and that one can evaluate with respect to these environments, are absolutely fundamental in Scheme. On the other hand, it would be unsafe (w.r.t. the future) to write code that depends on the current representation. If you find yourself doing that, better to ask for an official abstraction of whatever you're trying to do. (And even better to provide a patch for it!) For example, I see no problem with Kjetil's add-var-to-environment, because it doesn't depend on the representation. Neil