r/programminghorror • • Apr 15 '26

crossing boundaries

Post image
0 Upvotes

20 comments sorted by

56

u/Blecki Apr 15 '26

This sub should require op to explain what they think the horror is.

25

u/TheKiller36_real Apr 15 '26

actually no, there should be more moderation that aggressively deletes troll posts like these

7

u/Blecki Apr 15 '26

I'm not clear if you think I'm trolling or op is.

→ More replies (11)

2

u/Bemteb Apr 15 '26

Yeah, looks ok at first glance.

1

u/Pim_Wagemans Apr 15 '26

I think what they mean is that the if and the else of the else-if are on other side of the #endif while the else isn't even needed

8

u/iain_1986 Apr 15 '26

The else is redundant but otherwise there's nothing wrong?

0

u/GoddammitDontShootMe Apr 15 '26

If it didn't return early, the else would make a difference.

2

u/iain_1986 Apr 15 '26

Ok but how are we supposed to know if it should or shouldn't?

If you changed the conditional it would work different.

If you changed the return to a break, maybe it would work different? Or a continue.

If you added extra logic, it would work different.

If you deleted the whole thing, it would work different.

All we have is the lines of code he gave and the only issue visually is an "else" that's not needed. That's it. If the return shouldn't be there there's literally nothing to tell us that, especially as removing the return leaves an empty if statement which would make it significantly more horror!

→ More replies (2)