unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: Marius Vollmer <marius.vollmer@uni-dortmund.de>
Cc: neil@ossau.uklinux.net, raeburn@raeburn.org, emacs-devel@gnu.org
Subject: Re: Emacs Lisp and Guile
Date: 08 Aug 2002 18:35:37 +0200	[thread overview]
Message-ID: <ljvg6ls3za.fsf@burns.dt.e-technik.uni-dortmund.de> (raw)
In-Reply-To: <200208071424.g77EO0k03146@wijiji.santafe.edu>

Richard Stallman <rms@gnu.org> writes:

>     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.  However, Emacs enables the value to reside in various places
> besides the symbol itself.

I think we might agree anyway: from a general, low-level Scheme
implementation point of view, Elisp variables require 'arbitrary' code
to be run when they are accessed.  From the Elisp point of view this
code isn't arbitrary at all, it is just the code that is needed to
implement the desired behavior of Elisp variables.  To the Elisp
programmer, variables are passive data containers, but to the Scheme
implementation, they are 'active'.

Thus, allowing 'active' variables in Guile would be a way to implement
the behavior of Elisp variables.  The active variables would not need
to be completely general; they could be restricted to just the set of
features that are needed for Elisp variables (like forwarding to C
variables).  But I don't think that would be an advantage.  They would
still be different from ordinary Scheme variables, but not as useful
as they might be.  If I remember correctly, TCL can sent out
notifications when the value of a variable changes.  This feature
could be implemented on top of the general active variables without
having to change the low-level Guile execution model.  It might not be
implementable with just the Elisp behavior of variables.

But there is also the question of how to present active variables to
Scheme code, once we have them.  Since passive variables are a special
case of active variables, we can just let all variables be active
variables and get a very consistent system.

But I think it is highly desirable to be able to distinguish between
passive variables and active ones at compile time.  We do have to
distinguish between functions and macros already at compile time, so
this would not be an entirely new concept.  We also will want to
identify calls to certain functions at compile time so that they can
be optimized.  Since telling passive variables from active variables
is merely an optimization, we can put it in the latter category.

> A similar feature in Guile would be useful for many sorts of
> application programs.

Yes.

  reply	other threads:[~2002-08-08 16:35 UTC|newest]

Thread overview: 75+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2002-07-20  0:35 Emacs Lisp and Guile Richard Stallman
2002-07-20  8:37 ` Neil Jerram
2002-07-21 20:15   ` Richard Stallman
2002-07-24 22:05     ` Neil Jerram
2002-07-25 18:07       ` Richard Stallman
2002-07-25 19:16         ` Marius Vollmer
2002-07-27 18:53           ` Richard Stallman
2002-07-30 12:20             ` Marius Vollmer
2002-07-31  5:54               ` Richard Stallman
2002-08-01 19:39                 ` Marius Vollmer
2002-08-01 20:52                   ` Kai Großjohann
2002-08-02 10:23                     ` Marius Vollmer
2002-08-02 10:41                       ` Kai Großjohann
2002-08-02 12:09                         ` Marius Vollmer
2002-08-02 12:37                           ` Kai Großjohann
2002-08-05 15:19                             ` Marius Vollmer
2002-08-02 22:14                           ` Richard Stallman
2002-08-02 22:53                             ` Sam Steingold
2002-08-03 15:38                               ` Simon Josefsson
2002-08-03 16:15                                 ` Sam Steingold
2002-08-03 19:35                                   ` Lars Magne Ingebrigtsen
2002-08-03 20:33                                 ` Kai Großjohann
2002-08-03 20:40                                   ` Simon Josefsson
2002-08-03 22:41                                     ` Sam Steingold
2002-08-04  5:14                                     ` Eli Zaretskii
2002-08-04 23:26                                 ` Richard Stallman
2002-08-05 15:58                                   ` Sam Steingold
2002-08-09 18:02                                   ` Alex Schroeder
2002-08-11  3:54                                     ` Richard Stallman
2002-08-04 23:25                               ` Richard Stallman
2002-08-05 16:10                                 ` Sam Steingold
2002-08-10  7:17                                   ` Noah Friedman
2002-08-10 14:01                                     ` Alex Schroeder
2002-08-11 16:52                                     ` Sam Steingold
2002-08-02 17:43                   ` Richard Stallman
2002-08-05 16:08                     ` Marius Vollmer
2002-08-07 14:24                       ` Richard Stallman
2002-08-08 16:35                         ` Marius Vollmer [this message]
2002-08-09 16:39                           ` Richard Stallman
2002-08-12 14:51                             ` Marius Vollmer
2002-08-13  1:47                               ` Richard Stallman
2002-08-13 19:13                                 ` Marius Vollmer
2002-08-14  5:15                                   ` Richard Stallman
2002-08-14 18:26                                     ` Marius Vollmer
2002-08-15 19:53                                       ` Richard Stallman
2002-08-19 21:03                                         ` Marius Vollmer
2002-08-09  6:50                         ` Stefan Monnier
2002-08-10 17:16                           ` Richard Stallman
2002-08-07 14:24                       ` Richard Stallman
2002-08-07 15:38                         ` Simon Josefsson
2002-08-08  7:01                           ` Richard Stallman
2002-08-08 16:06                         ` Marius Vollmer
2002-08-09 16:39                           ` Richard Stallman
2002-08-12 13:40                             ` Marius Vollmer
2002-08-13  1:47                               ` Richard Stallman
2002-08-13 19:17                                 ` Marius Vollmer
2002-08-14  5:15                                   ` Richard Stallman
2002-08-14 18:21                                     ` Marius Vollmer
2002-08-10 14:32                     ` Michael Sperber [Mr.  Preprocessor]
2002-08-11  3:55                       ` Richard Stallman
2002-08-11  8:28                         ` Michael Sperber [Mr.  Preprocessor]
2002-08-12 17:05                           ` Richard Stallman
2002-08-13  6:58                             ` Michael Sperber [Mr.  Preprocessor]
     [not found]                             ` <ljr8h4803x.fsf@burns.dt.e-technik.uni-dortmund.de>
2002-08-13 22:47                               ` Richard Stallman
2002-08-14 18:50                                 ` Marius Vollmer
2002-08-15 19:53                                   ` Richard Stallman
2002-08-19 20:54                                     ` Marius Vollmer
2002-08-21  0:12                                       ` Richard Stallman
2002-07-28  8:17         ` Neil Jerram
2002-07-29 17:30           ` Richard Stallman
2002-07-25  4:22   ` Ken Raeburn
2002-11-05 23:28     ` Neil Jerram
2002-11-07  4:49       ` Richard Stallman
2002-11-07 20:32         ` Neil Jerram
2002-11-09 11:54           ` Richard Stallman

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=ljvg6ls3za.fsf@burns.dt.e-technik.uni-dortmund.de \
    --to=marius.vollmer@uni-dortmund.de \
    --cc=emacs-devel@gnu.org \
    --cc=neil@ossau.uklinux.net \
    --cc=raeburn@raeburn.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).