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: Anything better for delayed lexical evaluation than (lambda () ...)? Date: Wed, 14 Dec 2011 14:35:01 +0100 Message-ID: <8739cn5la2.fsf@pobox.com> References: <87liqtpsl9.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> <877h1zbg7s.fsf@fencepost.gnu.org> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: dough.gmane.org 1323869734 32627 80.91.229.12 (14 Dec 2011 13:35:34 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Wed, 14 Dec 2011 13:35:34 +0000 (UTC) Cc: Mark H Weaver , guile-devel@gnu.org To: David Kastrup Original-X-From: guile-devel-bounces+guile-devel=m.gmane.org@gnu.org Wed Dec 14 14:35:28 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 1RaozX-0001eS-4w for guile-devel@m.gmane.org; Wed, 14 Dec 2011 14:35:27 +0100 Original-Received: from localhost ([::1]:57160 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RaozW-0006H0-Nv for guile-devel@m.gmane.org; Wed, 14 Dec 2011 08:35:26 -0500 Original-Received: from eggs.gnu.org ([140.186.70.92]:60925) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RaozQ-0006Go-On for guile-devel@gnu.org; Wed, 14 Dec 2011 08:35:25 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1RaozK-0007ZB-VH for guile-devel@gnu.org; Wed, 14 Dec 2011 08:35:20 -0500 Original-Received: from a-pb-sasl-sd.pobox.com ([74.115.168.62]:38467 helo=sasl.smtp.pobox.com) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RaozE-0007Wt-CA; Wed, 14 Dec 2011 08:35:08 -0500 Original-Received: from sasl.smtp.pobox.com (unknown [127.0.0.1]) by a-pb-sasl-sd.pobox.com (Postfix) with ESMTP id 9CCB76FFA; Wed, 14 Dec 2011 08:35:07 -0500 (EST) 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=IN2M/T/Z1LG/WAgYL7EG6v1Vbr8=; b=xtRSiq aLjcc6MVOtE0/v3NXGjUNt+eT9mCynjTk+YstG1Ck0uwp+9mEK6XRhSrxH6AI1Q/ Xo9Gm85LnMzNUnZRYhN+eAccSGqr9Oz4IpY5m+TczCmbSZho04LwK4z4nEcEaYnN LTzsGTNolPy0iqGXeRjGYHlTGLJ5hR+XUnTSY= 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=A8IiJTSLLKHX84QSo6xV1fXBiR5L7Leb MWQs6ngGp2N0gsIPsc/T0GP+BGkb1a7ASuUiZJkOGgSqVKY7Lx3I9GTbcN1uy6F6 ZYWXALiLguJnIBzbs09wr94uXSySop5CPuZHbUx3kAr+Vs7HWk7uDItfTpkfjhPo vDkka/uvDXM= 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 8B7F06FF9; Wed, 14 Dec 2011 08:35:07 -0500 (EST) Original-Received: from badger (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 C6C026FF8; Wed, 14 Dec 2011 08:35:05 -0500 (EST) In-Reply-To: <877h1zbg7s.fsf@fencepost.gnu.org> (David Kastrup's message of "Wed, 14 Dec 2011 11:27:51 +0100") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.3 (gnu/linux) X-Pobox-Relay-ID: 6F0805CC-2658-11E1-B840-65B1DE995924-02397024!a-pb-sasl-sd.pobox.com X-detected-operating-system: by eggs.gnu.org: Solaris 10 (beta) X-Received-From: 74.115.168.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:13091 Archived-At: Hi David, On Wed 14 Dec 2011 11:27, David Kastrup writes: > 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. Let's call it `(the-environment)', as it is what it was called in Guile 1.8. >> why should we have it in Guile? > > feature completeness and user friendliness. OK, so we are not arguing for efficiency then. (That's fine, but we should be clear about it.) > Emacs Lisp or Lua or other binding-intensive systems. `the-environment' is not useful for Elisp or Lua. We already have an OK Elisp implementation, and it will be quite good once bipt merges his branch. It is implemented as a compiler to tree-il. Likewise there is a branch for Lua. It has some issues, but not unsolveable, and not related to this question. It is also implemented as a compiler to tree-il. > 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. Indeed. > 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. I agree. I agree also that Guile should do its best to be good for lilypond. It is my opinion -- and I could be wrong here, either by misunderstanding (again!) the issues, or for whatever reason -- that closures are the best solution to the #{#} problem. Reasons: * Lambda is standard, well-understood, and general. * Using `lambda' does not preclude compilation. * Using closures does not require any additional work on the part of Guile. (This is only partly selfish; it also decreases the amount of coupling of lilypond to any particular Guile version.) * Allows for integration with the debugger, in 2.0. (Currently, interpreted code does not debug well.) * Potentially more efficient, and will benefit from future speed improvements in Guile. WDYT? Andy -- http://wingolog.org/