Re:TOML, Tom's Own Markup Language
by grey-area on Sunday February 24, 2013 @02:56AM
(#5273343)
Because the primitive is called Hash
So naturally people talk of Hashes etc. I understand where you're coming from, but it's really not very important, and it would be more confusing to talk of Hash Tables as learners would naturally look for HashTable in the stdlib.
[ Parent
| on HN ]
That was the question: why the class is named Hash instead of HashMap or Dictionary? Was it done intentionally, or it is just an accident because someone did not know English very well?
I agree Map or Dictionary would have been fine too, but it's so widely used it needs to be easy to type so two words is not great (HashMap). However I suspect it was just named that way following perl (written by an english speaker). Obviously it's far to late to change it now and I can't say it bothers me or most Ruby users. It's something you get used to very quickly.
So do what python did: dict
Though even HashMap isn't bad because typing is a solved problem - with auto completion and touch typing two words really aren't an issue in my mind.
People get used to living with all kinds of things, but that doesn't make them any better. Yes I'm aware that this applies equally to my typing comment as to you having got used to hash.
> why the class is named Hash instead of HashMap
Why in golang is a function denoted by func instead of function?
I'd guess it's because programmers prefer fewer keystrokes as long as the term remains sufficiently mnemonic.