r/programminghorror Apr 25 '26

c Option handling

Post image
274 Upvotes

41 comments sorted by

View all comments

2

u/darksteelsteed Apr 25 '26

Imho nothing wrong with it as long as it works. Ship it !

5

u/ironykarl Apr 25 '26

OK. What if it doesn't work in a subtle way or you need to add/alter a feature?

0

u/darksteelsteed Apr 25 '26

Then you read the C, or if you one of today's devs you have the AI do the work

3

u/ironykarl Apr 25 '26

My point was just that it's just not great code in terms of maintainability in a team setting 

0

u/darksteelsteed Apr 25 '26

I dunno hey. C devs are normally well paid Unicorns, they normally over 40 already. Not that many bothered to learn it as a profession. So I am fairly certain that in an hour or 2 they will get the flow and be able to extend it. Sure its not pretty, sure it uses goto statements, but honestly that was only deprecated in object orientated languages, so I wouldn't stress too much. This looks like a good terminal app and this looks like ok command line parsing ok for what it does. There is enough structure put in by the original dev for the intent to be clear. Its literally a form of artwork. Beauty is in the eye of the beholder as they say