From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: "Stephen J. Turnbull" Newsgroups: gmane.emacs.devel Subject: Re: hash-table-{to, from}-alist Date: Tue, 25 Nov 2008 10:50:53 +0900 Message-ID: <87bpw4k1z6.fsf@xemacs.org> References: <863aknitfg.fsf@lifelogs.com> <20080830051807.GB9625@tomas> <86bpwe9su5.fsf@lifelogs.com> <867i6z1jo5.fsf_-_@lifelogs.com> <86ej14vhvg.fsf@lifelogs.com> <20081122054510.GA28298@tomas> <873ahkkkt5.fsf@xemacs.org> <20081122152126.GA4142@tomas> <87vdufk6do.fsf@xemacs.org> <867i6tt4yz.fsf@lifelogs.com> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: ger.gmane.org 1227577657 13946 80.91.229.12 (25 Nov 2008 01:47:37 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Tue, 25 Nov 2008 01:47:37 +0000 (UTC) Cc: emacs-devel@gnu.org To: Ted Zlatanov Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Tue Nov 25 02:48:40 2008 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1L4n2c-0002Fn-TH for ged-emacs-devel@m.gmane.org; Tue, 25 Nov 2008 02:48:39 +0100 Original-Received: from localhost ([127.0.0.1]:38707 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1L4n1T-0003Mr-L5 for ged-emacs-devel@m.gmane.org; Mon, 24 Nov 2008 20:47:27 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1L4n1P-0003JC-7X for emacs-devel@gnu.org; Mon, 24 Nov 2008 20:47:23 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1L4n1N-0003FM-Ni for emacs-devel@gnu.org; Mon, 24 Nov 2008 20:47:22 -0500 Original-Received: from [199.232.76.173] (port=56232 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1L4n1N-0003F5-Kr for emacs-devel@gnu.org; Mon, 24 Nov 2008 20:47:21 -0500 Original-Received: from mtps02.sk.tsukuba.ac.jp ([130.158.97.224]:35154) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1L4n1N-00031O-BW for emacs-devel@gnu.org; Mon, 24 Nov 2008 20:47:21 -0500 Original-Received: from uwakimon.sk.tsukuba.ac.jp (uwakimon.sk.tsukuba.ac.jp [130.158.99.156]) by mtps02.sk.tsukuba.ac.jp (Postfix) with ESMTP id 4E5F2820F; Tue, 25 Nov 2008 10:47:19 +0900 (JST) Original-Received: by uwakimon.sk.tsukuba.ac.jp (Postfix, from userid 1000) id 0973B1A2D03; Tue, 25 Nov 2008 10:50:54 +0900 (JST) In-Reply-To: <867i6tt4yz.fsf@lifelogs.com> X-Mailer: VM 8.0.12-devo-585 under 21.5 (beta28) "fuki" 83e35df20028+ XEmacs Lucid (x86_64-unknown-linux) X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.6, seldom 2.4 (older, 4) X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:106126 Archived-At: Ted Zlatanov writes: > The equality test is necessary if it was given originally (meaning, > if it's not 'eql). I don't think we should ever omit it, even if > it's the default value, for readability. I disagree. But it's not incompatible as long as you don't make the :test option to make-hash-table obligatory. ;-) > Would this work? > > #s(hash-table size 2 test equal data (k1 v1) (k2 v2)) Not quite. The data field in XEmacs is a plist, and the construct above signals an error. #s(hash-table size 2 test equal data (k1 v1 k2 v2)) > Finally, the size is just a hint with make-hash-table; should the (read) > allow wrong sizes or throw an error? XEmacs allows wrong sizes. I think this makes sense, but it probably isn't deliberate (the structure-reading mechanism validates field values one at a time; I don't see a provision for cross-field consistency checks). #s(hash-table size 10 data (y y-value x x-value)) #