3 ms·
If you need a bunch of library features not found in the C standard, you could switch languages or you could ... use a library. "Use language builtin hash table
by hp 11y ago
If you need a bunch of library features not found in the C standard, you could switch languages or you could ... use a library. "Use language builtin hash table or write your own hash table" are not the only two options as this article suggests!
Quite a few hash tables out there, and very complete standard-library-like utility libraries too. (aside: failure to use one of these is a major cause of bad, bug-ridden C code, containing for example calls to dangerous old-school string API from the standard library.
If your C is of any size and you don't have a good string abstraction you are doing it wrong.)
There are lots of circumstances where I'd use something besides C, for sure. But if I was using C for a good reason, and needed a hash table, in most cases I would not write my own.