r/C_Programming • • 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.

95 Upvotes

238 comments sorted by

View all comments

Show parent comment

1

u/Dangerous_Region1682 Sep 14 '26

I still think at least the ANSI edition should be something one has to understand the intent of the language. The book to learn the basics of the language, probably not, but to have on your bookshelf to read through when you have a certain level of competency I think it has value.

There again back in 1977 when I learned the language the first, first edition was all I had so I’m still kind of attached to the thing excepting the ANSI edition is probably a better starting point now.

1

u/max123246 Sep 14 '26

I think a history book on C or listening to interviews would do you far better for learning about the intent of the language. I used the ansi edition, it's still has the same problems I listed above. C has been around for 40+ years since 1977, a lot of how people write C and consider best practice has changed

1

u/Dangerous_Region1682 Sep 14 '26

50 years ago there was not much else available. It was the early editions of the K&R book and the UNIX V6 source code or nothing.

Would I think that would be the best way today, but I’d still have the ANSI edition in my library and it’s worth a read as you become accomplished.