3 ms·
I get ya, but I think you just described abstraction. Sure, if we're speaking low-level, we might as well use "hashtable".
by outadoc 8y ago
I get ya, but I think you just described abstraction. Sure, if we're speaking low-level, we might as well use "hashtable".
- CydeWeys 8y agoWhen someone says "hashtable" in the context of writing software, they're most often specifying desired performance characteristics, not the specific implementation details. This is how Perl does it, for example. Also, there are Map implementations that don't have these performance characteristics, e.g. a TreeMap in Java which internally uses a red/black tree and thus provides logarithmic lookup and insertion. If I'm writing something that needs to do a lot of efficient lookups but only write "Map" in the spec, there's danger that the wrong thing will be used, and performance will suffer. It really does need a hashtable, not just a generic lookup interface.