3 ms·
(This is a bit off-topic, but I couldn't help it.) I noticed the article refers to "hashmap" as a data structure. Such as this statement: > Go maps are hashma
by alpb 8y ago
(This is a bit off-topic, but I couldn't help it.)
I noticed the article refers to "hashmap" as a data structure. Such as this statement:
> Go maps are hashmaps
I think instead of hashmap, this article could use "hash table", which is the actual data structure. The term hashmap sounds almost Java-specific to me (but I understand it helps distinguish when you have both TreeMap and HashMap in a language, like Java).
This is a cool article regardless, giving a sneak peek into the internals of Go map type.
- kaoD 8y agoDidn't sound that Java-specific to me: https://doc.rust-lang.org/std/collections/struct.HashMap.html https://doc.rust-lang.org/std/collections/struct.HashMap.htm... http://hackage.haskell.org/package/hashmap-1.3.3/docs/Data-HashMap.html http://hackage.haskell.org/package/hashmap-1.3.3/docs/Data-H... https://stdlib.ponylang.org/collections-HashMap/ https://stdlib.ponylang.org/collections-HashMap/ https://api.dartlang.org/stable/1.24.3/dart-collection/HashMap-class.html https://api.dartlang.org/stable/1.24.3/dart-collection/HashM... https://pocoproject.org/docs/Poco.HashMap.html https://pocoproject.org/docs/Poco.HashMap.html For me, HashMap is an abstract data type that adheres to the Map interface and is implemented with (i.e. has the performance characteristics of) a hash table. It's a subset of Map, hence the "go's maps are hashmaps" remark. HashSet is often implemented with hash tables too. I guess the difference is ADT vs data structure (and I see your point there), not Java-specificity.
- deleted 8y ago[deleted]