r/C_Programming • u/Just_Government3790 • Sep 12 '26
Question What C function would you delete and rewrite first, and why?
For me it's fnmatch - mostly because it's 40 year's old and smell's funny.
98
Upvotes
View all comments
Show parent comment
1
u/flatfinger Sep 14 '26
In the 1990s, it was widely understood that functions like fopen and malloc were suitable for tasks where the ability to run code on a wide range of machines interchangeably was more important than performance or semantics, but system functions were preferable when that level of portability was not required. Unfortunately, compiler writers have pushed an attitude that non-portability should be considered a defect whether or not anyone would ever want to run a program on other platforms.