From: Marius Vollmer <mvo@zagadka.ping.de>
Cc: neil@ossau.uklinux.net, raeburn@raeburn.org, emacs-devel@gnu.org
Subject: Re: Emacs Lisp and Guile
Date: 13 Aug 2002 21:13:19 +0200 [thread overview]
Message-ID: <87bs86lghc.fsf@zagadka.ping.de> (raw)
In-Reply-To: <200208130147.g7D1lsR07028@wijiji.santafe.edu>
Richard Stallman <rms@gnu.org> writes:
> > But I think that running arbitrary code is not good
> > design--variables should be variables, not act like functions.
>
> But they could be used as the basis for all kind of funny
> variable-like behavior.
>
> It could be. I wonder if there is a way to implement this that
> discourages misuse of the feature.
If we would implement this, we could first make it only available to
C. I expect people to want to use it from Scheme immediately, and
yell at us for not giving it to them. We could then answer that there
are better ways to achieve the same thing, like settable functions.
> Perhaps, instead of providing a way to say "run this code when there
> is an access to variable FOO", it could have to be done in two steps:
> first, define a feature for something special to do when accessing
> certain variables; second, turn on one of these features for a certain
> variable.
Yes. I don't understand what you are proposing in detail, but I'm
thinking about adding flags to our existing variables: one would be
for read-only variables, one would be for 'dumb' variables that you
are allowed to access directly (which I think is important for
performance), and maybe others. When a variable is not dumb, you need
to call scm_variable_ref, etc to access it, and these functions would
then be the single place where new behavior can be added.
If you don't care about performance too much, you can just use
scm_variable_ref, etc without looking at the flags. Otherwise, the
flags tell you what shortcuts you are allowed to take.
The feature for doing something special would be implemented inside
scm_variabe_ref, etc. To activate it, you would need to construct a
variable with the right flags. You wouldn't be able to change the
flags of existing variables.
> Of course, it is possible to write a higher level feature that would
> package up and combine those two steps. It would not be difficult.
> But many people would get the point and realize that was the wrong
> thing to do.
Yes, the variables that can run code on access need to be specially
constructed. You wont be able to specify code to be run for an
arbitrary variable. Sorry if I wasn't clear about this.
--
GPG: D5D4E405 - 2F9B BCCC 8527 692A 04E3 331E FAF8 226A D5D4 E405
next prev parent reply other threads:[~2002-08-13 19:13 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
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 [this message]
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
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87bs86lghc.fsf@zagadka.ping.de \
--to=mvo@zagadka.ping.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 external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.