Came across the above function overloading on Hacker News and was wondering what the combined brains of Lobsters though about this approach to function overloading in c.
I find the C11 Generic stuff rather ugly. The value of C is minimizing the distance between what you type and what executes at the cost of writing more.
I find the C11 Generic stuff rather ugly. The value of C is minimizing the distance between what you type and what executes at the cost of writing more.
Function overloading in C, via macros or whatever, is a code smell.
If whatever you’re doing is something that would benefit from parameter polymorphism, you probably shouldn’t be doing it in C.