From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: "Maciek Godek" Newsgroups: gmane.lisp.guile.user Subject: Re: Me no understand scoping Date: Wed, 30 Jul 2008 10:42:47 +0200 Message-ID: References: <87r69ccaus.fsf@unknownlamer.org> 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 1217407424 18033 80.91.229.12 (30 Jul 2008 08:43:44 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Wed, 30 Jul 2008 08:43:44 +0000 (UTC) To: guile-user@gnu.org Original-X-From: guile-user-bounces+guile-user=m.gmane.org@gnu.org Wed Jul 30 10:44:33 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 1KO7Hl-0005Xh-HO for guile-user@m.gmane.org; Wed, 30 Jul 2008 10:43:53 +0200 Original-Received: from localhost ([127.0.0.1]:35899 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1KO7Gr-0008Pl-7j for guile-user@m.gmane.org; Wed, 30 Jul 2008 04:42:57 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1KO7Gm-0008Ou-2z for guile-user@gnu.org; Wed, 30 Jul 2008 04:42:52 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1KO7Gk-0008Ne-2N for guile-user@gnu.org; Wed, 30 Jul 2008 04:42:51 -0400 Original-Received: from [199.232.76.173] (port=56296 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1KO7Gj-0008NU-Q4 for guile-user@gnu.org; Wed, 30 Jul 2008 04:42:49 -0400 Original-Received: from wf-out-1314.google.com ([209.85.200.169]:1257) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1KO7Gj-0005Gt-2k for guile-user@gnu.org; Wed, 30 Jul 2008 04:42:49 -0400 Original-Received: by wf-out-1314.google.com with SMTP id 28so310539wfc.24 for ; Wed, 30 Jul 2008 01:42:47 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:date:from:to :subject:in-reply-to:mime-version:content-type :content-transfer-encoding:content-disposition:references; bh=nD8IJrFjW4LUX+AfAsS7/aKgn/fcuqP+fLOpsZwSZ/w=; b=UEX9aNa0gQQt2yEuwwelBc9toIXcZjRaX+d88iibo403ASzUa61bXaJGMsIGHOl0Aj 4s40zCMVgbCWMv0FoDMtWXMotdl920rWL0iSOOC+3ijprEy25vnsTBQWnwar9MG1JEeN k2mwKnQw+tfDA/LZx5oLFgyOs3gpIyJBtbQdY= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:to:subject:in-reply-to:mime-version :content-type:content-transfer-encoding:content-disposition :references; b=XLXhNFDZSGl7gvaavxy4CFVet6d3dfvWfSDmJ2+skM+Csz0pUIF6odgTFa2BEpB3nN GMMdz/JCpZ5TLFSF0Z86qsGURXiCVbIu4ZVAEFKyxjvRS8vueuZ9MEhRkiKG2usEoTbU Sfw35iG2Hsmg8PJSOqij0ZLFWZ4RdPvyIemP8= Original-Received: by 10.143.28.7 with SMTP id f7mr2559990wfj.40.1217407367638; Wed, 30 Jul 2008 01:42:47 -0700 (PDT) Original-Received: by 10.142.141.17 with HTTP; Wed, 30 Jul 2008 01:42:47 -0700 (PDT) In-Reply-To: <87r69ccaus.fsf@unknownlamer.org> 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:6702 Archived-At: Clinton Ebadi: > `macroexpand-1' is helpful here -- (local-eval ,f env) is wrong. > > As a matter of style, you probably want to avoid local-eval as it will > have to be removed whenever Guile ends up with a faster compiler On the other hand, local-eval is explained in guile manual, while I couldn't find any documentation for guile's macroexpand-1, nor for scheme macroexpand-1 (there are some explanations available for the lisp language). So it's probably equally evil ;] > (one day when guile-vm is integrated into core and lexical environments > become fixed arrays or similar), and messing with existing lexical > environments is Very Bad (tm). Avoiding all uses of eval and, by > extension, local-eval is a good idea. as for eval, it will always be there (in RnRS) besides I don't imagine not messing with lexical environments :) The bad thing is that scopes aren't explicitly definable and the report doesn't say much about their properties. I don't know how about practical performance, but I'd find it best if they were implemented as (implicit) hash tables that could be bound to variables and passed as arguments. I think that they could perform equally good as fixed arrays for memoized procedures. Thanks, M.