4 ms·
Picky and probably pointless question: are they actually hashmaps? If I understand correctly, a hashmap isn’t the only way to implement an associative array.
by dghf 2y ago
Picky and probably pointless question: are they actually hashmaps? If I understand correctly, a hashmap isn’t the only way to implement an associative array.
- zabzonk 2y agoThat is certainly true - associative arrays in c++ (std::map) for example, are implemented as red-black trees.
- tgv 2y agoI think many devs don't know the difference and simply call any dictionary/associative array a hash map. It might be one of the concepts that "the internet" promotes: it sounds fancy, more technical, makes you seem more knowledgeable, so it gets repeated. Then newcomers think this is the way it's always been called, and that gives it enough visibility to become the preferred name.
- nmz 2y agoQuite frankly I'd love a programmers dictionary over terms, I recently called a file with a csv like format a db because, well, its not a csv and I don't know what else to call it.
- remram 2y agoA table?
- nmz 2y agowell, yeah, that's what a csv is but the format is not regular.
- dghf 2y agoCharacter-separated-value file?
- nmz 2y agoWell that's the problem, it isn't, its a pseudo csv. A simple csv can be done with {awk -F ,} you only have a certain amount of fields separated by ",". field N is ".+". This means you don't need a parser, but it also means the format is variable depending on the headers. but you also can create a simple BRE regex, thus having pretty good performance.
- meltyness 2y agoThis seems pertinent, NEWS > bash-5.0 to bash-5.1 > mm Seems to suggest it's indeed a hashmap in implementation, but I can't be bothered to look any closer.
- layer8 2y ago…and if so, do they mitigate against hash collision attacks?