logoalt Hacker News

Sesse__12/08/20241 replyview on HN

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?


Replies

zabzonk12/08/2024

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++.

show 1 reply