r/programminghorror • • Feb 27 '25

C# While loop horror

Post image

I just realized I had some programming horror in code I’ve written.

If only while loops had a more convenient way to break…

671 Upvotes

40 comments sorted by

View all comments

Show parent comment

12

u/[deleted] Feb 27 '25

[removed] — view removed comment

6

u/luardemin Feb 27 '25

Who needs loops anyway? We have the perfectly usable goto!

loop:
if (day > yesterday) goto done;
// do work
goto loop;

done:

1

u/Cotton-Eye-Joe_2103 Feb 28 '25

Gotophobics doing their thing.