From: James Coglan Date: 2009-03-05T02:01:27+09:00 Subject: Re: Any solutions to Ruby's inconsistencies? --000e0cd2515262392104644e0552 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit > > > > Or is my C.S. idea of a Hash too limited? Granted in Java they > > have HashMap, but if you enter one value and get a second one > > out it is a Map, regardless of how the keys are stored. > > Hey, why aren't Arrays called Maps instead? I've always found Java's naming of collections to be contrary to its idea of OO in that it exposes implementation details, e.g. HashSet, LinkedHashSet and TreeSet really ought to be called Set, OrderedSet and SortedSet to reflect their intended use rather than their internal structure. 'Map' is unfortunately too vague a term and could be used to refer to anything that maps a set of inputs to another set of outputs. You arguably call arrays, lambdas, methods and even objects 'maps'. HashMap actually isn't a bad name for this since it differentiates the data structure from other mapping objects. I don't mind 'table' or 'hashtable'. 'Dictionary' is a little restrictive in that it seems to imply string-only keys and seems to relate to JavaScript-style objects rather than real hashtables. All said, Hash isn't bad: it's an object that maps input to output by hashing the input, which is all you need to know really. --000e0cd2515262392104644e0552--