From: Stefan Monnier <monnier@iro.umontreal.ca>
To: Eli Zaretskii <eliz@gnu.org>
Cc: emacs-devel@gnu.org
Subject: Re: new `obarray` type
Date: Mon, 13 Mar 2017 13:22:20 -0400 [thread overview]
Message-ID: <jwvwpbtrtbh.fsf-monnier+emacs@gnu.org> (raw)
In-Reply-To: <8360jdch3f.fsf@gnu.org> (Eli Zaretskii's message of "Mon, 13 Mar 2017 17:49:08 +0200")
>> The patch below introduces a new type for obarrays, distinct
>> from vectors. Among other things, this makes it possible to print them
>> in a more useful way (it doesn't print the contents, only the size, so
>> the printed form is not computer-readable, but it's more
>> palatable to the user).
>> Printing obarrays in a `read`able way seems like something that should
>> be under the control of variable, since it's unclear in general what it
>> would mean (for abbrev-tables, it would probably mean to print the name
>> of every symbol, along with it value, function, and plist slots, but
>> doing that for the `obarray` variable doesn't seem right (and it's not
>> even clear what the `value` of each symbol in it should be, for
>> buffer-local symbols)).
> Let me be the devil's advocate: are there any clients of this change
> other than abbrev-tables defined during the build time?
Actually, this change doesn't even solve the problem of dumping&reloading
abbrev-tables. I think we'd be better off reimplementing abbrev tables
using something like hash-tables.
IOW, while this new obarray type was inspired by the work on dumping
Emacs, it doesn't really attempt to solve that problem. All this does,
really, instead is to provide a separate type so that cl-defmethod can
dispatch on it, and so we can print it in a human-readable way and using
the usual #<...> notation that makes it clear that the output is not
`read`able.
> Because if they are the only justification, then it's much easier to
> define them in startup.el instead, which will make the problem go
> away. Right?
Definitely.
Stefan
next prev parent reply other threads:[~2017-03-13 17:22 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-03-13 1:36 new `obarray` type Stefan Monnier
2017-03-13 15:49 ` Eli Zaretskii
2017-03-13 17:22 ` Stefan Monnier [this message]
2017-03-13 22:03 ` Alan Mackenzie
2017-03-14 1:46 ` Herring, Davis
2017-03-14 12:52 ` Stefan Monnier
2017-03-14 20:14 ` Alan Mackenzie
2017-03-15 17:25 ` Stefan Monnier
2017-03-15 18:19 ` Lars Brinkhoff
2017-03-15 19:24 ` (:named nil) in cl-defstruct (was: new `obarray` type) Stefan Monnier
2017-03-15 19:39 ` Noam Postavsky
2017-03-15 20:28 ` (:named nil) in cl-defstruct Stefan Monnier
2017-07-23 14:03 ` Converting CC Mode's obarrays to hash tables. [Was: new `obarray` type] Alan Mackenzie
2017-07-24 14:06 ` Stefan Monnier
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=jwvwpbtrtbh.fsf-monnier+emacs@gnu.org \
--to=monnier@iro.umontreal.ca \
--cc=eliz@gnu.org \
--cc=emacs-devel@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).