Guile Mailing List Archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Scheme style auto-resizing hashtable (fwd)
On Fri, 6 Nov 1998, Maciej Stachowiak wrote:
>
> jglascoe@jay.giss.nasa.gov writes:
> >
> > 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?).
> >
>
> 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.
>
the great Larry Wall wrote that the three virtues of a programmer are
hubris, laziness, and impatience. I believe all Schemers on this mailing
list are guilty on all three counts (some more guilty than others,
perhaps).
I say this: the whole dictionary => ordered entries concept is more than a
little tenuous. If, at sometime in the future, somebody writes a
collection type data structure with ordered elements, then I propose they
name the type either "ordered-collection" or "telephone-book"!
On Mon, 2 Nov 1998, Jay Glascoe wrote:
> On Tue, 3 Nov 1998, Tel wrote:
>
> > Hash tables don't maintain order of the keys. Dictionaries are in
> > alphabetical order (last time I looked at a paper one was a while
> > back). You have to be a little bit careful when freely associating
> > concepts.
>
> I don't want to keep my entries ordered!
>
> but is "ordered entries" really an integral attribute of dictionaries?
> Aren't paper dictionaries ordered because people can't hash the word
> they're looking up in their heads? Or is e.g., "aardvark" somehow
> related to the Aare River in Switzerland?
ah yes, the old "aardvark" related to the "Aare River" argument. But
"telephone-book", now we're talink! "Hansen, James" IS probably related
to "Hansen, James Jr.".
"telephone-book", *telephone-book*, TELEPHONE-BOOK !!
> > "last time I looked at a paper one was a while back"
>
> right, on-line
> dictionaries can internally store their entries in whatever order they
> darn well please. Does this make any difference to the user? Does this
> make, e.g. http://www.m-w.com/ not a *real* dictionary?
ah, but there aren't many on-line telephone books, now are there?
> I'll comment on the latest revision of your suggested API in a later
> message.
>
> - Maciej
>
as always, thanks for your input Maciej.
BTW, how about simply "table"? that's what Dylan calls its hash tables.
Jay Glascoe
jglascoe@jay.giss.nasa.gov
Guile Home |
Main Index |
Thread Index