From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: "Stefan Monnier" Newsgroups: gmane.emacs.devel Subject: Re: Emacs Lisp and Guile Date: Fri, 09 Aug 2002 02:50:52 -0400 Sender: emacs-devel-admin@gnu.org Message-ID: <200208090650.g796orD11386@rum.cs.yale.edu> References: <200207200035.g6K0ZAb27891@aztec.santafe.edu> <200207212015.g6LKF4c00874@aztec.santafe.edu> <200207251807.g6PI75d07615@aztec.santafe.edu> <874renlito.fsf@zagadka.ping.de> <200207271853.g6RIre710837@aztec.santafe.edu> <200207310554.g6V5ssc16508@aztec.santafe.edu> <200208021743.g72HhkX01596@aztec.santafe.edu> <200208071424.g77EO0k03146@wijiji.santafe.edu> NNTP-Posting-Host: localhost.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: main.gmane.org 1028875827 13498 127.0.0.1 (9 Aug 2002 06:50:27 GMT) X-Complaints-To: usenet@main.gmane.org NNTP-Posting-Date: Fri, 9 Aug 2002 06:50:27 +0000 (UTC) Cc: marius.vollmer@uni-dortmund.de, neil@ossau.uklinux.net, raeburn@raeburn.org, emacs-devel@gnu.org Return-path: Original-Received: from quimby.gnus.org ([80.91.224.244]) by main.gmane.org with esmtp (Exim 3.35 #1 (Debian)) id 17d3bN-0003Vb-00 for ; Fri, 09 Aug 2002 08:50:25 +0200 Original-Received: from fencepost.gnu.org ([199.232.76.164]) by quimby.gnus.org with esmtp (Exim 3.12 #1 (Debian)) id 17d3xp-0005cu-00 for ; Fri, 09 Aug 2002 09:13:38 +0200 Original-Received: from localhost ([127.0.0.1] helo=fencepost.gnu.org) by fencepost.gnu.org with esmtp (Exim 3.35 #1 (Debian)) id 17d3c4-0003sZ-00; Fri, 09 Aug 2002 02:51:08 -0400 Original-Received: from rum.cs.yale.edu ([128.36.229.169]) by fencepost.gnu.org with esmtp (Exim 3.35 #1 (Debian)) id 17d3bq-0003pz-00; Fri, 09 Aug 2002 02:50:54 -0400 Original-Received: (from monnier@localhost) by rum.cs.yale.edu (8.11.6/8.11.6) id g796orD11386; Fri, 9 Aug 2002 02:50:53 -0400 X-Mailer: exmh version 2.4 06/23/2000 with nmh-1.0.4 Original-To: Richard Stallman Errors-To: emacs-devel-admin@gnu.org X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.0.11 Precedence: bulk List-Help: List-Post: List-Subscribe: , List-Id: Emacs development discussions. List-Unsubscribe: , List-Archive: Xref: main.gmane.org gmane.emacs.devel:6375 X-Report-Spam: http://spam.gmane.org/gmane.emacs.devel:6375 > Right now, a variable is a strictly passive data container. You can't > intercept accesses to it. A variable reference is a direct reference > to memory, not a function call. We would have to change this model to > also allow 'active' variables that can run arbitrary code when they > are accessed. > > That is not what I am suggesting. Variables in Emacs do not run > arbitrary code when accessed; I think that would be a misguided > feature. In Scheme we can use fluid-let to implement Elisp-style dynamic binding. The only difference with Elisp is that you use `fluid-let' instead of `let' when binding a variable dynamically. I think we should aim to move in the direction where most let-bound variables are lexically scoped and the rest (i.e. `defvar'd variables) is accessed/modified via special functions/macros. In most cases (in Elisp practice) lexical or dynamic scoping of let-bound (and not defvar'd) variables has exactly the same semantics. Miles' `lexbind' branch is trying to do just that as is someone on the XEmacs side (the means are different, tho). If we can get high enough compatibility (maybe full compatibility is even possible), that would mean that running "arbitrary code" when accessing a dynamic variable is at least not a performance problem (and it can be very convenient when debugging). It could also be useful for meta-variables (such that setting them modifies all those that depend on it: it currently can be done in very limited ways via the :set parameter to defcustom). Stefan