From: Stefan Monnier <monnier@iro.umontreal.ca>
To: David Kastrup <dak@gnu.org>
Cc: David Reitter <david.reitter@gmail.com>,
Miles Bader <miles@gnu.org>, Emacs-Devel <emacs-devel@gnu.org>
Subject: Re: Specifiers
Date: Thu, 29 May 2008 13:36:47 -0400 [thread overview]
Message-ID: <jwviqwxavow.fsf-monnier+emacs@gnu.org> (raw)
In-Reply-To: <86k5hdnkrp.fsf@lola.quinscape.zz> (David Kastrup's message of "Thu, 29 May 2008 18:21:46 +0200")
> Note that this is mostly theoretic: in practice, one would rarely want
> to use different locus types for a single variable.
Until you get bug-reports. The situation changes significantly if you
disallow combining different locus types: it's still not great
performancewise, but it's much more sane.
>> - what about `let'? This one is really fun!
> `let' temporarily makes a locus-free binding. The locality gets
> restored at the end of let. This is not different to the current
> interaction of buffer-locality and let.
The current `let' behavior does not create temporarily
a locus-free binding. E.g.
(let ((default-directory "toto"))
(with-current-buffer "newbuf" default-directory)
does not return "toto".
>> what does
>> (let ((var val)) .. (make-local-variable 'var locus) ..)
>> do? how 'bout
>> (make-local-variable 'var foo) .. (let ((var val)) .. (setq var foo)?
>> or
>> (make-local-variable 'var foo)..(let ((var val))..(select-other-foo..)var)?
> It gets messy. But this messiness is nothing new:
There is something new about it, which is that as you add more types of
loci, it gets more and more difficult and costly to react to
locus-changes (e.g. set-buffer, select-window, select-frame, setq
major-mode, ...).
> The problem is that we already have buffer-locality and frame-locality
> and terminal-locality.
Indeed, that's a problem. But frame-locality is on the way out.
Buffer-locality is here to stay, I think.
As for terminal-locality it is both less clean (because it's not really
developped, e.g. no equivalent to local-variable-p), and less
problematic because it cannot be combined with buffer-locality or
frame-locality and it is automatically local to all terminals rather
than only some, so it basically doesn't have global bindings, and it
only applies to predefined variables.
> And the behavior of all those is currently inconsistent. The approach
> I proposed would make them consistent.
Show me a patch, so I can shoot holes through it.
Or better, don't bother: you'd be wasting your time.
> Adding something functionally similar to the existing localities but
> incompatible is not really helping keeping things simple.
You're looking for a simplicity akin to a 17-dimension "unifiying theory
of physics". You may end up with a single very powerful and orthogonal
set of features, but I do not believe you'll get something simple.
> And as long as not more than one locality was introduced, there would
> be no speed impact for the list-based implementation.
I do not know what you're referring to here.
Stefan
next prev parent reply other threads:[~2008-05-29 17:36 UTC|newest]
Thread overview: 56+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-05-27 2:49 face-remapping patch Miles Bader
2008-05-28 2:03 ` Florian Beck
2008-05-28 2:31 ` Miles Bader
2008-05-29 1:38 ` Richard M Stallman
2008-05-28 2:54 ` Stefan Monnier
2008-05-28 3:30 ` Miles Bader
2008-05-28 7:22 ` David Reitter
2008-05-28 7:29 ` Miles Bader
2008-05-28 8:05 ` Miles Bader
2008-05-28 9:30 ` David Kastrup
2008-05-28 13:13 ` Miles Bader
2008-05-28 13:33 ` David Kastrup
2008-05-28 9:33 ` David Reitter
2008-05-28 13:21 ` Miles Bader
2008-05-28 14:33 ` David Reitter
2008-05-28 19:25 ` Face realization (was: face-remapping patch) Stefan Monnier
2008-05-28 19:54 ` David Reitter
2008-05-29 15:25 ` Face realization Stefan Monnier
2008-05-28 19:25 ` face-remapping patch Stefan Monnier
2008-05-28 20:21 ` David Kastrup
2008-05-28 20:31 ` David Kastrup
2008-05-29 6:02 ` tomas
2008-05-29 18:14 ` Stephen J. Turnbull
2008-05-29 22:15 ` David Kastrup
2008-05-30 4:48 ` Stephen J. Turnbull
2008-05-30 13:32 ` Richard M Stallman
2008-05-30 13:50 ` David Kastrup
2008-05-31 15:17 ` Richard M Stallman
2008-05-31 15:38 ` David Kastrup
2008-06-01 14:03 ` Richard M Stallman
2008-05-29 10:25 ` Richard M Stallman
2008-05-29 11:14 ` David Kastrup
2008-05-29 15:45 ` Specifiers (was: face-remapping patch) Stefan Monnier
2008-05-29 16:21 ` Specifiers David Kastrup
2008-05-29 17:36 ` Stefan Monnier [this message]
2008-05-29 18:17 ` Specifiers Stephen J. Turnbull
2008-05-30 2:08 ` Specifiers (was: face-remapping patch) Richard M Stallman
2008-05-30 2:21 ` Specifiers Stefan Monnier
2008-05-30 5:31 ` Specifiers David Kastrup
2008-05-30 14:10 ` Specifiers Stefan Monnier
2008-05-30 14:14 ` Specifiers David Kastrup
2008-05-30 15:11 ` Specifiers Stefan Monnier
2008-05-31 15:16 ` Specifiers Richard M Stallman
2008-05-29 15:56 ` face-remapping patch Stefan Monnier
2008-05-29 16:27 ` David Kastrup
2008-05-29 8:47 ` Miles Bader
2008-05-29 15:59 ` Stefan Monnier
2008-05-29 18:28 ` Eli Zaretskii
2008-05-30 3:42 ` Miles Bader
2008-05-28 14:46 ` Chong Yidong
2008-05-28 14:57 ` David Reitter
2008-05-28 16:33 ` Miles Bader
2008-05-30 15:10 ` Chong Yidong
2008-06-01 2:43 ` Miles Bader
2008-05-28 16:37 ` Dan Nicolaescu
2008-05-28 17:45 ` Miles Bader
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=jwviqwxavow.fsf-monnier+emacs@gnu.org \
--to=monnier@iro.umontreal.ca \
--cc=dak@gnu.org \
--cc=david.reitter@gmail.com \
--cc=emacs-devel@gnu.org \
--cc=miles@gnu.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).