From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: Mikael Djurfeldt Newsgroups: gmane.lisp.guile.devel,gmane.lisp.guile.user Subject: Re: About hash-table iterators Date: Fri, 13 Feb 2004 18:22:06 -0500 Sender: guile-devel-bounces+guile-devel=m.gmane.org@gnu.org Message-ID: References: <1074950358.23546.902.camel@localhost> Reply-To: djurfeldt@nada.kth.se NNTP-Posting-Host: deer.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: sea.gmane.org 1076714758 8059 80.91.224.253 (13 Feb 2004 23:25:58 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Fri, 13 Feb 2004 23:25:58 +0000 (UTC) Cc: m.vollmer@ping.de, djurfeldt@nada.kth.se Original-X-From: guile-devel-bounces+guile-devel=m.gmane.org@gnu.org Sat Feb 14 00:25:44 2004 Return-path: Original-Received: from monty-python.gnu.org ([199.232.76.173]) by deer.gmane.org with esmtp (Exim 3.35 #1 (Debian)) id 1Armgp-00020w-00 for ; Sat, 14 Feb 2004 00:25:43 +0100 Original-Received: from localhost ([127.0.0.1] helo=monty-python.gnu.org) by monty-python.gnu.org with esmtp (Exim 4.24) id 1Armf0-0007WH-Ge for guile-devel@m.gmane.org; Fri, 13 Feb 2004 18:23:50 -0500 Original-Received: from list by monty-python.gnu.org with tmda-scanned (Exim 4.24) id 1ArmeU-0007Mc-Uw for guile-devel@gnu.org; Fri, 13 Feb 2004 18:23:18 -0500 Original-Received: from mail by monty-python.gnu.org with spam-scanned (Exim 4.24) id 1Armdx-00077y-6w for guile-devel@gnu.org; Fri, 13 Feb 2004 18:23:16 -0500 Original-Received: from [213.212.20.77] (helo=kvast.blakulla.net) by monty-python.gnu.org with esmtp (Exim 4.24) id 1ArmdP-0006sx-Ug; Fri, 13 Feb 2004 18:22:12 -0500 Original-Received: from chunk.mit.edu ([18.42.2.92] helo=chunk ident=Debian-exim) by kvast.blakulla.net with esmtp (Exim 3.36 #1 (Debian)) id 1ArmdL-0000rL-00; Sat, 14 Feb 2004 00:22:07 +0100 Original-Received: from mdj by chunk with local (Exim 4.30) id 1ArmdK-0000EL-Iv; Fri, 13 Feb 2004 18:22:06 -0500 Original-To: Roland Orre , guile-user@gnu.org, guile-devel@gnu.org In-Reply-To: (Mikael Djurfeldt's message of "Tue, 27 Jan 2004 11:07:53 -0500") User-Agent: Gnus/5.1006 (Gnus v5.10.6) Emacs/21.3 (gnu/linux) X-BeenThere: guile-devel@gnu.org X-Mailman-Version: 2.1.2 Precedence: list List-Id: Developers list for Guile, the GNU extensibility library List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guile-devel-bounces+guile-devel=m.gmane.org@gnu.org Xref: main.gmane.org gmane.lisp.guile.devel:3369 gmane.lisp.guile.user:2795 X-Report-Spam: http://spam.gmane.org/gmane.lisp.guile.user:2795 Mikael Djurfeldt writes: > The design decision for hash-for-each and hash-map was to abstract > away the handle's, which are lower-level details of the representation > of the table, and, also, to promote a functional style of programming. > > The decision is supported by the same choice made for Common Lisps's > `maphash' (although Common Lisp has setf so that the side-effects (the > *only* effects, btw) also include mutating the table). Also, java > does not use the concept of handles either. BTW, since then I've looked around, and virtually every Scheme implementation I find have made the same choice as we have. > However, we *do* support handles in another set of functions. > (Unfortunately, the abstraction is not complete here. If we pass out > a handle object, we should have accessor and mutator functions for > this object and not just presume that it is a pair!) > > So, I'm inclined to support your idea of introducing > hash-for-each-handle. Since I didn't get any feedback I went ahead and checked this into CVS HEAD: 2004-02-13 Mikael Djurfeldt (scm_internal_hash_for_each_handle, scm_hash_for_each_handle): New functions. > I don't think we need to introduce hash-map-handles, though. > > Also: Is it the case that hash-map has a really bad name? It strikes > me that one would expect hash-map to return another hash table. > Should it instead be named hash-map-to-list or something better? 2004-02-13 Mikael Djurfeldt * hashtab.c, hashtab.h (scm_hash_map_to_list): Renamed from scm_hash_map. 2004-02-12 Mikael Djurfeldt * boot-9.scm (module-map): Renamed hash-map -> hash-map->list. M _______________________________________________ Guile-devel mailing list Guile-devel@gnu.org http://mail.gnu.org/mailman/listinfo/guile-devel