29 points · by signa11 · 3y ago · 9 comments
BTW, it is really none of your business, "seriously though".
- Using C for anything but systems programming is either malevolence or for fun, there's no pratical reason for it. In this case you probably don't want to have external dependencies only to have data structures.
- Having dependencies in C is an absolute pain in the ass unless it's a single header file (such as sqlite). It also makes it much harder to make the codebase portable.
I might try it out though just for gigs and laughs.
Tangentially, I wonder why more C developers don't use self-contained dependencies such as GNULib [0], Klib [1], or APR [2] instead of reimplementing base primitives. It's so common for C projects to reimplement every single thing from scratch. "If you want to make a pie from scratch, you must first invent the universe" kind of thing.
Managing packages is a pain, but reimplementing an efficient battle-tested hash table is even worse IMO. Would be happy to hear it from people who worked (professionally) with C about this.
[0]: https://www.gnu.org/software/gnulib/
The difference is that C people usually has a different view on the data structures, in a sense that under system level programming context most of the data structures will be much more efficient when adapted into the context. That's why you did not see that many "universal" C data structure library because they know it is a hard thing to mess up with if you need efficiency.