Re:TOML, Tom's Own Markup Language
by oleganza on Sunday February 24, 2013 @06:31AM
(#5273851)
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?
[ Parent
| on HN ]
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.