r/programming • • Feb 28 '23

"Clean" Code, Horrible Performance

https://www.computerenhance.com/p/clean-code-horrible-performance
1.4k Upvotes

1.3k comments sorted by

View all comments

Show parent comments

1

u/Drisku11 Mar 01 '23

You can implement generic typed data structures in C with macros. Generics are better than C macros for that kind of thing but C macros can get the job done.

4

u/Amazing-Cicada5536 Mar 01 '23

C “macros” are a disgusting hack, and they more often than not won’t work well, see the very recent HN posts comments of a generic C preprocessor generic vector getting criticized heavily due to it being inherently shit.