Top posts

Every blog post that took off on Hacker News, ranked by the votes of its best submission. 4,389 posts.

Systems & Performance
Any year
1878

Stop Memsetting Structures

TL;DR: Use C99’s designated initializers instead. Because it’s 2019! Edit: This post was discussed on Hacker News, Lobste.rs and /r/c_programming. It has been updated to address some of the concerns raised by commenters. One of the little things that annoy me when reading code is the unnecessary use of memset() to…