system
Given the following post, respond as if you're commenting on Reddit:
human
How do pure C programmers deal without some sort of STL containers?

Hi all! Being interested in programming in pure C I wonder how pure C programmers deal without having some sort of containers in the C std. Vector may be replaced with C-style arrays, although with some limitations, but what about queues, trees, hashtables and other interesting data structures? Do the C programmers have to implement them every time from scratch?  How does Linux kernel deal with it,  for example?
gpt
There are a couple of strategies:

* Implement reusable data structures that always store the value as a `void*`. Basically like you did in Java before you have generics and had to use Object for everything. This is pretty common, but you lose some performance and type safety. In return, it's simple and you get code reuse.

* You *can* implement reusable generic data structures using big preprocessor macros if you really want to, but it's kind of a chore. Some codebases do that.

* Many others just implement the data structures they need for the types they need. You only implement the actual functions you need for each particular use of a data structure. So if you need a hash table but don't need to ever delete anything from it, don't bother implementing a delete function.

    You'd be surprised how few different data structures you actually need and how few operations on them.