From: Mikael Djurfeldt <mdj@mit.edu>
Cc: m.vollmer@ping.de, djurfeldt@nada.kth.se
Subject: Re: About hash-table iterators
Date: Fri, 13 Feb 2004 18:22:06 -0500 [thread overview]
Message-ID: <xy7vfma4lb5.fsf@chunk.mit.edu> (raw)
In-Reply-To: <xy7vfmxnzmu.fsf@chunk.mit.edu> (Mikael Djurfeldt's message of "Tue, 27 Jan 2004 11:07:53 -0500")
Mikael Djurfeldt <mdj@mit.edu> 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 <djurfeldt@nada.kth.se>
(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 <djurfeldt@nada.kth.se>
* hashtab.c, hashtab.h (scm_hash_map_to_list): Renamed from
scm_hash_map.
2004-02-12 Mikael Djurfeldt <djurfeldt@nada.kth.se>
* 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
prev parent reply other threads:[~2004-02-13 23:22 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2004-01-24 13:19 About hash-table iterators Roland Orre
2004-01-27 16:07 ` Mikael Djurfeldt
2004-01-27 17:39 ` Roland Orre
2004-02-13 23:22 ` Mikael Djurfeldt [this message]
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
List information: https://www.gnu.org/software/guile/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=xy7vfma4lb5.fsf@chunk.mit.edu \
--to=mdj@mit.edu \
--cc=djurfeldt@nada.kth.se \
--cc=m.vollmer@ping.de \
/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.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).