5 ms·
It's all fun and games in C until you need a hashmap...
by foobarian 5y ago
It's all fun and games in C until you need a hashmap...
- Spivak 5y agoI mean it's not that dire. I've found uthash and glib's HashTable to be fine to work with.
- foobarian 5y agoI'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.
- arthurcolle 5y agoIt's not really heavy wizardry to write one that suits your needs. EDIT: or just use redis lol
- speed_spread 5y agoI shiver at the thought of maintaining a bespoke C HashMap
- Karrot_Kream 5y agoMaintain 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 agoI 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.