Stephen J. Turnbull wrote:
The only answer I have to that is RTFM. :-( Hash tables are simple
in
concept, and complex in implementation. AFAICT efficiency requires
exposing a bit of the complexity (the :size parameter) to the user.
Part of problem is that the default print representation prints the
number of buckets, rather than the maximum number of elements. So it's
punching a hole in the hash table abstraction and exposing an
implementation detail. If someone really needs to know the number of
buckets, let's provide a API for that.
To make matters worse, the printed representation uses the same "size"
keyword. So "size" means one thing in the default printed
representation, but it means something else in the readable
representation and in the API. I think this inconsistency is the main
thing I find annoying.
These are code issues, which I think should be fixed (modulo the usual
caveats about when someone finds time to do it).
If you have a bone to pick with TFM, let me know and I'll fix it
(and
"patches welcome", of course).
The docstring for print and friends should mention print-readably. A
specific list of objects for which print-readably is relevant (e.g.,
hash table) would be nice, but I can see arguments for not including
such a list.
I may have some suggestions for make-hash-table, too, but I want to
think about that a little more.
I can put some doc patches on my to-do list if we have rough agreement
about what should go into them.
mike
_______________________________________________
XEmacs-Beta mailing list
XEmacs-Beta(a)xemacs.org
http://lists.xemacs.org/mailman/listinfo/xemacs-beta