1. 27
  1.  

    1. 3

      This is precisely the thing I love about C. It makes you think about your data structures. I’m excited to try out the same sort of stuff in Zig when it becomes more stable.

      While this level of control absolutely not necessary when you just want to get things done and have them work, sometimes I just wanna play around with low level code and feel clever. There’s something really satisfying about low level data structure manipulations, and how it all comes together in the end, to create something more meaningful than the sum of its parts.

      1. 2

        Yeah, it’s worth knowing that data structures can be really small, both in terms of code and data, because sometimes (rarely) a tiny bespoke hash table is just the thing. I used one when I rewrote BIND’s DNS name compression code which roughly halved the compression code size and massively improved zone transfer performance.

      2. -4

        Heartwarming: local C programmer reimplements basic data structures slow, error-prone, and anti-modular, for the nth time! Says it’s ‘a good use of time’ and they ‘look forward to doing it again in the future’.