From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Stefan Monnier Newsgroups: gmane.emacs.devel Subject: Re: hash-table-{to, from}-alist Date: Mon, 24 Nov 2008 21:57:19 -0500 Message-ID: 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 1227581864 22584 80.91.229.12 (25 Nov 2008 02:57:44 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Tue, 25 Nov 2008 02:57:44 +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 03:58:47 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 1L4o8Q-0000O3-HR for ged-emacs-devel@m.gmane.org; Tue, 25 Nov 2008 03:58:42 +0100 Original-Received: from localhost ([127.0.0.1]:40216 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1L4o7H-0001bf-7K for ged-emacs-devel@m.gmane.org; Mon, 24 Nov 2008 21:57:31 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1L4o7D-0001bE-64 for emacs-devel@gnu.org; Mon, 24 Nov 2008 21:57:27 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1L4o7B-0001b1-Sk for emacs-devel@gnu.org; Mon, 24 Nov 2008 21:57:25 -0500 Original-Received: from [199.232.76.173] (port=52237 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1L4o7B-0001ay-N4 for emacs-devel@gnu.org; Mon, 24 Nov 2008 21:57:25 -0500 Original-Received: from ironport2-out.teksavvy.com ([206.248.154.182]:25409) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1L4o7B-0001hL-I0 for emacs-devel@gnu.org; Mon, 24 Nov 2008 21:57:25 -0500 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AtEEACT4KknO+J+z/2dsb2JhbACBbdA2gnyBHQ X-IronPort-AV: E=Sophos;i="4.33,661,1220241600"; d="scan'208";a="30256902" Original-Received: from 206-248-159-179.dsl.teksavvy.com (HELO pastel.home) ([206.248.159.179]) by ironport2-out.teksavvy.com with ESMTP; 24 Nov 2008 21:57:21 -0500 Original-Received: by pastel.home (Postfix, from userid 20848) id 6BE738107; Mon, 24 Nov 2008 21:57:19 -0500 (EST) In-Reply-To: <867i6tt4yz.fsf@lifelogs.com> (Ted Zlatanov's message of "Mon, 24 Nov 2008 11:21:24 -0600") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.0.60 (gnu/linux) X-detected-operating-system: by monty-python.gnu.org: Genre and OS details not recognized. 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:106129 Archived-At: RMS> #s(hash-table size 1 data (x x-value)) RMS> Being compatible with that seems like a good idea, RMS> if there is no obstacle. > 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 don't see any reason to treat this specially, actually. > The :weakness, :rehash-size, and :rehash-threshold options to > make-hash-table, can probably be omitted when they are the defaults. Indeed. > Would this work? > #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? I don't know what "size" is meant to represent in XEmacs's or CL's use of this representation. Is it the expected average number of elements in the table? or the expected max number of elements? or the current number of elements? Stefan