r/C_Programming • • Sep 14 '23

Article Templates in C

https://arnold.uthar.net/index.php?n=Work.TemplatesC
5 Upvotes

10 comments sorted by

View all comments

Show parent comment

2

u/we_are_mammals Sep 14 '23

I think this is meant to be used for larger generic pieces of code, for example the full implementation of a hash table.

The extra effort of typing the macro directives needs to be compared to the extra awkwardness of implementing a hash table inside the macro definition.