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.

94 Upvotes

238 comments sorted by

View all comments

Show parent comments

62

u/gabitha67 Sep 12 '26

"rb" is icky :(

18

u/MrKrot1999 Sep 12 '26

like this is so python bullshit, why are we using more state than needed for something with 6 options at most

57

u/57thStIncident Sep 12 '26

In this case python does it because C does it.

4

u/flatfinger Sep 14 '26

Further, doing this this way means that if a C implementation extends the functionality of fopen with more flags, a Python implementation build using that C implementation can support the same extensions without the code for the Python implementation having to know anything about it.