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] |
Tel writes: ... > 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. "Dictionary" is a term coming from tradition as much as metaphor. Python, Smalltalk, and Objective C (and I imagine other languages I don't know about) all call hash tables dictionaries. Hash tables usually end up being the most commonly used type of key-indexed collection. So they give it a nice name that doesn't force one to think about the implementation. Without a compelling reason to do otherwise, a programmer should generally choose to use hash tables I'd think. Maybe it's a matter of trying to improperly impose another language's naming schemes onto Guile, but IMHO those naming schemes are well thought out. However, they also encompass things which have already been decided in Scheme, so maybe the advantage is somewhat lost. > index->list > table->ids > table->attributes What about index->hash-table (or index->dictionary, or whatever)? And vice-versa, of course. <-------------------------------------------------------------------> < Ian Bicking | bickiia@earlham.edu > < drawer #419 Earlham College | http://www.cs.earlham.edu/~bickiia > < Richmond, IN 47374 | (765) 973-2824 > <------------------------------------------------------------------->