From: "Herring, Davis" <herring@lanl.gov>
To: Alan Mackenzie <acm@muc.de>, Stefan Monnier <monnier@iro.umontreal.ca>
Cc: "emacs-devel@gnu.org" <emacs-devel@gnu.org>
Subject: Re: new `obarray` type
Date: Tue, 14 Mar 2017 01:46:40 +0000 [thread overview]
Message-ID: <1489455999896.26186@lanl.gov> (raw)
In-Reply-To: <20170313220335.GA5098@acm>
> Indeed, why not just print _all_ vectors by printing only their size?
> The arguments which apply to obarrays surely apply equally to all
> vectors.
No -- obarrays are special in that they have hash buckets chained with invisible link pointers. It is a disservice to the user to have this appear as a normal vector. (A minor one, though, since most users never look at it at all and some of the rest know the lie.)
> Not rarely, particularly in CC Mode, I will be dealing with obarrays
> with relatively small numbers of symbols. Of course I want to see these
> symbols' names when I ask for that obarray to be printed.
And if it happens that your symbols suffer a hash collision? How long will you spend wondering where your Nth expected symbol went?
> I suspect most obarrays in existence (with the essential exception of
> Emacs's main obarray) are relatively small, hence printing them as a
> vector is the Right Thing to do.
I don't think printing an arbitrary subset (dependent on the order of insertion) of the contents of an obarray can be considered the Right Thing.
> Would a new obarray type prevent any vector operations being carried
> out on it, should any package do such things? If so, that would be a
> Bad Thing.
The Elisp Reference Manual says specifically not to try to edit an obarray (but to use [un]intern); what else would you call -- length (which counts buckets)? aref (which, given a meaningless index, fetches the same random subset of symbols that would be printed)?
Davis
next prev parent reply other threads:[~2017-03-14 1:46 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
2017-03-13 22:03 ` Alan Mackenzie
2017-03-14 1:46 ` Herring, Davis [this message]
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
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1489455999896.26186@lanl.gov \
--to=herring@lanl.gov \
--cc=acm@muc.de \
--cc=emacs-devel@gnu.org \
--cc=monnier@iro.umontreal.ca \
/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.