Separating a Hash type from Object

Lars T Hansen lth at acm.org
Wed Jul 25 13:11:47 PDT 2007


On 7/25/07, Brad Fults <bfults at gmail.com> wrote:
> On 7/25/07, Brendan Eich <brendan at mozilla.org> wrote:
> > I can take maximum blame for advocating Dict over Dictionary, based
> > on brevity and the Python type, transliterated appropriately
> > (capitalized, I mean ;-).
> >
> > But Hash is just as good by that crude metric.
> >
> > We'll have another straw poll. Hash was mooted early on, but then
> > Dictionary stuck, and later I urged brevity. Thanks for the reminder.
>
> If it wasn't clear from the subject line of this thread, I also vote
> for "Hash" over "Dict" for similar reasons to those already mentioned.

The nice thing about "Dictionary" or "Dict" or "Map" is that it says
something about functionality, whereas "Hash" or "HashMap" says
something about implementation.  On the other hand, the interface is
plainly hashcode-based, so it's possible it's only fair to emphasize
that fact in the name.

If so, I vote for "Hashtable": "Hash" is ugly and overly short;
"HashMap" is BiCapitalized and "map" is less common than "table" in
the context of hash structures.  (Java has both, unsurprisingly, and
they are essentially the same, Hashtable being synchronized and
HashMap not.)

--lars



More information about the Es4-discuss mailing list