Comment on Real quick question about the "break"
amio@kbin.social 11 months ago
Ignore it. A lot of people somehow in charge of teaching coding couldn't code their way out of a wet paper bag.
They are in a ton of languages in all kinds of different families for a reason: they are a logical and fairly consistent expression of two fairly consistently logical ways to deal with control flow in the specific case of a loop - exiting an iteration early, either terminating the whole loop or continuing from the next one. Also there's the switch-case case in C-style languages.
Now, there are legitimate arguments for avoiding tons of of exotic control flow shenanigans, but if someone doesn't understand break/continue, then the problem is 100% theirs and nobody should take their advice on anything much, let alone relating to programming.
m_r_butts@kbin.social 11 months ago
OP said ignoring the rule is an instant fail. They don't have that option.
amio@kbin.social 11 months ago
Yeah, no shit. I sort of assumed the question was about the actual concepts as they relate to actual programming.