From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: David Kastrup Newsgroups: gmane.lisp.guile.devel Subject: Re: Anything better for delayed lexical evaluation than (lambda () ...)? Date: Wed, 14 Dec 2011 11:27:51 +0100 Message-ID: <877h1zbg7s.fsf@fencepost.gnu.org> References: <87liqtpsl9.fsf@fencepost.gnu.org> <87d3bvfo5d.fsf@fencepost.gnu.org> <871usaicvi.fsf@netris.org> <87mxaycmlx.fsf@fencepost.gnu.org> <87wra1hcek.fsf@netris.org> <87mxaxihnw.fsf@pobox.com> <87obvclu92.fsf@fencepost.gnu.org> <87aa6wbp0w.fsf@pobox.com> <87fwgolgm5.fsf@fencepost.gnu.org> <8762hkbkwi.fsf@pobox.com> <87borclcem.fsf@fencepost.gnu.org> <87zkewa2vy.fsf@pobox.com> <87zkewjvyz.fsf@fencepost.gnu.org> <87vcpka13n.fsf@pobox.com> <87zkewnzy7.fsf@netris.org> <87r5089ui3.fsf@pobox.com> <87r508nv0o.fsf@netris.org> <87fwgondme.fsf@netris.org> <87borboalb.fsf@netris.org> <87liqf5uty.fsf@pobox.com> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: dough.gmane.org 1323858794 17623 80.91.229.12 (14 Dec 2011 10:33:14 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Wed, 14 Dec 2011 10:33:14 +0000 (UTC) Cc: Mark H Weaver , guile-devel@gnu.org To: Andy Wingo Original-X-From: guile-devel-bounces+guile-devel=m.gmane.org@gnu.org Wed Dec 14 11:33:07 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 1Ram95-0005xc-7q for guile-devel@m.gmane.org; Wed, 14 Dec 2011 11:33:07 +0100 Original-Received: from localhost ([::1]:41437 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Ram94-0000AX-JF for guile-devel@m.gmane.org; Wed, 14 Dec 2011 05:33:06 -0500 Original-Received: from eggs.gnu.org ([140.186.70.92]:34867) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Ram8x-00006Y-HU for guile-devel@gnu.org; Wed, 14 Dec 2011 05:33:05 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Ram8w-0005dY-3h for guile-devel@gnu.org; Wed, 14 Dec 2011 05:32:59 -0500 Original-Received: from fencepost.gnu.org ([140.186.70.10]:39626) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Ram8v-0005dU-Vi for guile-devel@gnu.org; Wed, 14 Dec 2011 05:32:57 -0500 Original-Received: from localhost ([127.0.0.1]:49543 helo=lola) by fencepost.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Ram8v-0002RI-8b; Wed, 14 Dec 2011 05:32:57 -0500 Original-Received: by lola (Postfix, from userid 1000) id D1546E5092; Wed, 14 Dec 2011 11:27:51 +0100 (CET) In-Reply-To: <87liqf5uty.fsf@pobox.com> (Andy Wingo's message of "Wed, 14 Dec 2011 11:08:41 +0100") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.0.92 (gnu/linux) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 3) X-Received-From: 140.186.70.10 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:13086 Archived-At: Andy Wingo writes: > On Wed 14 Dec 2011 08:50, Mark H Weaver writes: > >> I have successfully implemented the (capture-lexical-environment) >> special form in the evaluator, and also primitive-local-eval. > > I dunno, Mark. That's a neat hack, but why should we have it in Guile? > It can't compile. It's not for efficiency, because if you wanted more > efficiency, you would compile. Most of the multi-list commands in srfi-1 have awful performance implications once you give them more than a single list. And you can usually create more efficient equivalent code manually for most non-generic uses of them. So they are obviously not in there for efficiency, but rather feature completeness and user friendliness. > So what is it for? It has a cost, so it needs to justify itself. It is a trade-off. The reason to include it in Guile rather than providing it as an external package is because it depends on internals of Guile, and thus needs to be maintained along with it. Is the expected cost of maintenance worth the gain in Guile's attractiveness? A more thorough solution that would actually cooperate with the compiler would likely be more attractive, and more prone to maintenance. But it would also likely serve to hold open the architecture for future developments or plugins that could be interesting for integrating Guile into other language systems like Emacs Lisp (which is only very slowly moving towards lexical bindings) or Lua or other binding-intensive systems. Language interfaces that are not strictly ad-hoc and closed-door would certainly help in keeping Guile interesting for applications where the respective maintainers don't have to count on the continued cooperation of Guile developers, but merely on the continued existence of published interfaces. I can't judge the best trade-off point here. Nor how complex it would be to actually work with the compiler, and be reasonably confident that it will continue to work without too much hassle in future. But an outside package meddling with undocumented internals is not safe to rely on at all. It can break at any point of time with no active Guile developer being in a position where he would feel compelled to fix it for the sake of Guile. -- David Kastrup