|
|
|
|
|
by scrame
3488 days ago
|
|
> I type hash = {} in Ruby and there is no need to declare it as HashTable (what else could it possibly be?) In java you have options other than a HashMap, there is LinkedHashMap (which preserves insertion order) and TreeMap (which stays sorted according to a comparator). There are also extensions for things like Immutability. The checking can also guarantee that it will only have one type of object, or a common interface, or you could allow it to accept any kind of object. So, yeah, there's quite a few things that an associative array could be, and there's reasons for all that, and i've used most of these on web backends. |
|