Better HN
top
new
best
ask
show
jobs
Log in
Sign up
Better HN
Comment
by
foobarian
· 5y ago · 0 comments
It's all fun and games in C until you need a hashmap...
Comments
[–]
arthurcolle
5y ago
It's not really heavy wizardry to write one that suits your needs.
EDIT: or just use redis lol
[–]
speed_spread
5y ago
I shiver at the thought of maintaining a bespoke C HashMap
[–]
Karrot_Kream
5y ago
Maintain what though? Hashmaps don't need to be secure, and as long as you have a hash function and an array, that's all you need.
[–]
mbrodersen
5y ago
I wrote a commercial 3D game engine from scratch in C starting with just a bare bone OS on a console. It was a lot of fun actually. Not hard.
[–]
Spivak
5y ago
I mean it's not that dire. I've found uthash and glib's HashTable to be fine to work with.
[–]
foobarian
OP
5y ago
I've been copying the same hashtable.[ch] file to all my new projects since the 90s. :-) I suppose it could be viewed as a strength of C that it lives below that level of abstraction and prescribe too much of the standard library.