News for hackers. Stuff that matters.
Re:Show HN: A portable hash map in C by Sesse__ on Sunday December 08, 2024 @04:47PM (#42360880)
And then have a union between the two different kinds of pointers, and a tag to tell which one is in use, then test that tag everywhere? Why? What good does it bring for that extra complexity?
Re:Show HN: A portable hash map in C by zabzonk on Sunday December 08, 2024 @04:57PM (#42360985)
Doesn't the name of the function select for the types and use of the parameters? But I haven't written in C for a long time, and this I think could be done more clearly in C++.
Re:Show HN: A portable hash map in C by Sesse__ on Monday December 09, 2024 @12:38PM (#42368301)
You're saying you would write the entire hash table four times, with everything duplicated and no reuse? Again: Why? What do you gain compared to one line to suppress a warning?
Re:Show HN: A portable hash map in C by zabzonk on Monday December 09, 2024 @05:19PM (#42371182)
Clarity? And in C++ at least, I would re-write the functions.