This is the mail archive of the guile@cygnus.com mailing list for the guile project.
Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
---|---|---|
Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |
jglascoe@jay.giss.nasa.gov writes: > I'm sure you're all anxious to hear about my hash table extension ;) > > front page news: my extension underwent the GREAT RENAMING: > > $ for x in *.[ch] makefile; do > > perl -ne ' > > s/hashtab/dictionary/g; > > s/hash table/dictionary/g; > > s/table/dictionary/g; > > s/dictionarys/dictionaries/g; > > print; > > ' $x > foo > > mv foo $x > > done > > I decided to go with "dictionary" because > > On Sat, 31 Oct 1998, Ian Bicking sagely murmured: > > > A rich set of datatypes could also be a powerful addition. Make > > dictionaries, not hash tables -- mostly that's just a matter of > > terminology, but I think it's important. As a programmer, I don't > > care about the fact that hash tables use hashing, I care about the > > fact that hash tables are a collection of values indexed by keys. > > and > > On Sat, 31 Oct 1998, Maciej Stachowiak hummed this tune: > > > ... Scheme has a tradition of using meaningful identifiers and uniform > > surface syntax ... > > <taken slightly out of context> > > so what do I have here? "dictionary" and "meaningful identifiers". hmm. > I also considered using "hash-table" (used by CL, so I just said "No."), > "assoc-array" (one letter longer than "dictionary", you lose), and even > "auto-hash" (where did that come from?). > I forgot to fully qualify my statement - it should have read "meaningful and precise identifiers". I think `hashtable' or `hash-table' is better than `dictionary' because `dictionary' calls to mind a general class of types which provide mappings from keys to values, while `hash-table' calls to mind a specific implementation that guarantees average-case O(1) insertion and deletion. A dictionary could be implemented as a hash table, an association list, a procedure, a red-black tree, an AVL tree, a B-Tree, an ordered association list, etc. To reserve the name `dictionary' for the hashtable implementation seems arrogant to me. I'll comment on the latest revision of your suggested API in a later message. - Maciej