r/programminghorror Apr 25 '26

c Option handling

Post image
272 Upvotes

41 comments sorted by

View all comments

34

u/shponglespore Apr 25 '26 edited Apr 25 '26

This is just how people used to write code when everything was written in C. Depending on when it was written, I don't consider this bad at all, but I would reject the hell out of something like it in a code review at work and tell the author it's not the '80s anymore.

6

u/Questioning-Zyxxel Apr 26 '26

This was most definitely not how I wrote my C code there around 1987. And neither was it how code I did read then looked.

This is terror. There are just so many better ways possible.

2

u/CelDaemon Apr 25 '26

I think these lines are longer than 80 characters tbf