From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: "Herring, Davis" Newsgroups: gmane.emacs.devel Subject: Re: new `obarray` type Date: Tue, 14 Mar 2017 01:46:40 +0000 Message-ID: <1489455999896.26186@lanl.gov> References: , <20170313220335.GA5098@acm> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable X-Trace: blaine.gmane.org 1489456022 26591 195.159.176.226 (14 Mar 2017 01:47:02 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Tue, 14 Mar 2017 01:47:02 +0000 (UTC) Cc: "emacs-devel@gnu.org" To: Alan Mackenzie , Stefan Monnier Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Tue Mar 14 02:46:55 2017 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by blaine.gmane.org with esmtp (Exim 4.84_2) (envelope-from ) id 1cnbY5-0006Cw-4Q for ged-emacs-devel@m.gmane.org; Tue, 14 Mar 2017 02:46:53 +0100 Original-Received: from localhost ([::1]:55942 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1cnbYB-0005WL-3z for ged-emacs-devel@m.gmane.org; Mon, 13 Mar 2017 21:46:59 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:42575) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1cnbY0-0005V6-Cm for emacs-devel@gnu.org; Mon, 13 Mar 2017 21:46:49 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1cnbXx-0003eS-AC for emacs-devel@gnu.org; Mon, 13 Mar 2017 21:46:48 -0400 Original-Received: from proofpoint8.lanl.gov ([204.121.3.47]:58189) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1cnbXx-0003e4-21 for emacs-devel@gnu.org; Mon, 13 Mar 2017 21:46:45 -0400 Original-Received: from pps.filterd (proofpoint8.lanl.gov [127.0.0.1]) by proofpoint8.lanl.gov (8.16.0.20/8.16.0.20) with SMTP id v2E1g00A105273; Mon, 13 Mar 2017 19:46:42 -0600 Original-Received: from mailrelay2.lanl.gov (mailrelay2.lanl.gov [128.165.4.103]) by proofpoint8.lanl.gov with ESMTP id 294ew2pebu-1; Mon, 13 Mar 2017 19:46:42 -0600 Original-Received: from localhost (localhost.localdomain [127.0.0.1]) by mailrelay2.lanl.gov (Postfix) with ESMTP id 7D837F75E3B; Mon, 13 Mar 2017 19:46:42 -0600 (MDT) X-NIE-2-Virus-Scanner: amavisd-new at mailrelay2.lanl.gov Original-Received: from EXG13-P-MBX09.win.lanl.gov (exg13-p-mbx09.win.lanl.gov [128.165.106.111]) by mailrelay2.lanl.gov (Postfix) with ESMTP id C605CF75E38; Mon, 13 Mar 2017 19:46:40 -0600 (MDT) Original-Received: from EXG13-P-MBX06.win.lanl.gov (2002:80a5:6a2c::80a5:6a2c) by EXG13-P-MBX09.win.lanl.gov (2002:80a5:6a6f::80a5:6a6f) with Microsoft SMTP Server (TLS) id 15.0.1236.3; Mon, 13 Mar 2017 19:46:40 -0600 Original-Received: from EXG13-P-MBX06.win.lanl.gov ([fe80::5476:2baf:bfbc:e26a]) by EXG13-P-MBX06.win.lanl.gov ([fe80::5476:2baf:bfbc:e26a%19]) with mapi id 15.00.1236.000; Mon, 13 Mar 2017 19:46:40 -0600 Thread-Topic: new `obarray` type Thread-Index: AQHSm5phh8V2tDLPlkSW+JLJFpENOKGTuLKA///WOG4= In-Reply-To: <20170313220335.GA5098@acm> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-ms-exchange-transport-fromentityheader: Hosted x-originating-ip: [128.165.106.202] X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10432:, , definitions=2017-03-14_01:, , signatures=0 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 spamscore=0 suspectscore=0 malwarescore=0 phishscore=0 adultscore=0 bulkscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1702020001 definitions=main-1703140013 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x [generic] [fuzzy] X-Received-From: 204.121.3.47 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Original-Sender: "Emacs-devel" Xref: news.gmane.org gmane.emacs.devel:213001 Archived-At: > Indeed, why not just print _all_ vectors by printing only their size?=0A= > The arguments which apply to obarrays surely apply equally to all=0A= > vectors.=0A= =0A= No -- obarrays are special in that they have hash buckets chained with invi= sible 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.)=0A= =0A= > Not rarely, particularly in CC Mode, I will be dealing with obarrays=0A= > with relatively small numbers of symbols. Of course I want to see these= =0A= > symbols' names when I ask for that obarray to be printed.=0A= =0A= And if it happens that your symbols suffer a hash collision? How long will= you spend wondering where your Nth expected symbol went?=0A= =0A= > I suspect most obarrays in existence (with the essential exception of=0A= > Emacs's main obarray) are relatively small, hence printing them as a=0A= > vector is the Right Thing to do.=0A= =0A= I don't think printing an arbitrary subset (dependent on the order of inser= tion) of the contents of an obarray can be considered the Right Thing.=0A= =0A= > Would a new obarray type prevent any vector operations being carried=0A= > out on it, should any package do such things? If so, that would be a=0A= > Bad Thing.=0A= =0A= 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 b= uckets)? aref (which, given a meaningless index, fetches the same random s= ubset of symbols that would be printed)?=0A= =0A= Davis=