From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: ludo@gnu.org (Ludovic =?utf-8?Q?Court=C3=A8s?=) Newsgroups: gmane.lisp.guile.devel Subject: Re: Mutable top-level bindings Date: Sat, 20 Apr 2013 16:00:32 +0200 Message-ID: <87txn18fpb.fsf@gnu.org> References: <9D053760-46BC-46F1-B84D-07902E777FF2@bluewin.ch> <87haj72q08.fsf@tines.lan> <20130417152753.GA13533@lotus.destinee.acro.gen.nz> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Trace: ger.gmane.org 1366466459 9823 80.91.229.3 (20 Apr 2013 14:00:59 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sat, 20 Apr 2013 14:00:59 +0000 (UTC) To: guile-devel@gnu.org Original-X-From: guile-devel-bounces+guile-devel=m.gmane.org@gnu.org Sat Apr 20 16:01:02 2013 Return-path: Envelope-to: guile-devel@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1UTYLe-0004IU-Jc for guile-devel@m.gmane.org; Sat, 20 Apr 2013 16:01:02 +0200 Original-Received: from localhost ([::1]:48995 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UTYLe-00070M-0h for guile-devel@m.gmane.org; Sat, 20 Apr 2013 10:01:02 -0400 Original-Received: from eggs.gnu.org ([208.118.235.92]:59675) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UTYLN-0006zv-5e for guile-devel@gnu.org; Sat, 20 Apr 2013 10:00:46 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1UTYLK-000718-2a for guile-devel@gnu.org; Sat, 20 Apr 2013 10:00:45 -0400 Original-Received: from plane.gmane.org ([80.91.229.3]:44198) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UTYLJ-000714-SD for guile-devel@gnu.org; Sat, 20 Apr 2013 10:00:42 -0400 Original-Received: from list by plane.gmane.org with local (Exim 4.69) (envelope-from ) id 1UTYLF-00041N-RN for guile-devel@gnu.org; Sat, 20 Apr 2013 16:00:37 +0200 Original-Received: from reverse-83.fdn.fr ([80.67.176.83]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Sat, 20 Apr 2013 16:00:37 +0200 Original-Received: from ludo by reverse-83.fdn.fr with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Sat, 20 Apr 2013 16:00:37 +0200 X-Injected-Via-Gmane: http://gmane.org/ Original-Lines: 43 Original-X-Complaints-To: usenet@ger.gmane.org X-Gmane-NNTP-Posting-Host: reverse-83.fdn.fr X-URL: http://www.fdn.fr/~lcourtes/ X-Revolutionary-Date: 1 =?utf-8?Q?Flor=C3=A9al?= an 221 de la =?utf-8?Q?R?= =?utf-8?Q?=C3=A9volution?= X-PGP-Key-ID: 0xEA52ECF4 X-PGP-Key: http://www.fdn.fr/~lcourtes/ludovic.asc X-PGP-Fingerprint: 83C4 F8E5 10A3 3B4C 5BEA D15D 77DD 95E2 EA52 ECF4 X-OS: x86_64-unknown-linux-gnu User-Agent: Gnus/5.130005 (Ma Gnus v0.5) Emacs/24.3 (gnu/linux) Cancel-Lock: sha1:GB6yfYHYI9ZCJany3ngut8veSEo= X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 80.91.229.3 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:16277 Archived-At: "Chris K. Jester-Young" skribis: > On Mon, Apr 15, 2013 at 10:00:55PM -0400, Mark H Weaver wrote: >> Unfortunately, this is rarely possible in a language like Scheme, where >> calls to procedures bound by mutable top-level variables are frequent. >> We cannot fix this without making most commonly-used top-level bindings >> immutable. Last I checked, there was strong resistance to this idea. > > Maybe it's time to reopen this (and hope it's not a can of worms). :-) > > With a proper module system, I don't see why top-level bindings should > be mutable. [...] > Yes, this does disable the ability to perform monkey-patching. I don't > see this as a big loss, but perhaps there are legitimate use cases for > monkey-patching that I haven't thought of. Several uses cases would need to be addressed: - Uses of ‘set!’ for bootstrapping purposes as in boot-9.scm (I found myself using a similar idiom in because I couldn’t come up with another approach.) - Patching, as in , where we’re able to work around a Guile bug without actually bundling a copy of the fixed module. - Live development (with Geiser), as Mark noted. ProofGeneral does something interesting, where evaluated forms become immutable in the file, and have to be “de-evaluated” in reverse order to become mutable again. That provides additional consistency guarantees, but remains far less flexible than what Scheme has to offer. > Another thing we will need to provide is define-values, +1 Thanks, Ludo’.