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

21

u/crakked21 Sep 12 '26

My uni still teaches it in its CS 101 course xD

9

u/FlyByPC Sep 12 '26

From the questions I see online, lots of college courses are still teaching students using PIC16F84A and 16F877A microcontrollers, which were getting old twenty years ago.

3

u/Mountain-Builder-654 Sep 13 '26

Mine switched from pic to arduino the year I took the class. Dodged a bullet there

2

u/flatfinger Sep 14 '26

From what I understand, the cheapest microcontrollers aren't made by Microchip, but use an architecture which is very closer to the PICs than to anything else, and have a C-dialect compiler available for them. The C dialect used by the HiTech C compiler (at least before Microsoft bought HiTech) gave a good feel for how C was designed to be suitable for use on quirky execution environments. The C dialect used by Keil's 8051 compiler was perhaps even better in that regard; someone familiar with the 8051 might think it would be impossible to write a C compiler that could generate efficient code for it, but C programs that were designed around the platform's quirks could be quite efficient.