News for hackers. Stuff that matters.
Re:GOTOphobia Considered Harmful (In C) by bdowling on Monday February 27, 2023 @02:08AM (#34953874)
> CONTINUE and BREAK are quite different from GOTO in that they operate predictably given the current scope

CONTINUE, BREAK, and GOTO all operate predictably because they are deterministic operations. Each continues program execution at the directed explicit (goto) or implicit (continue or break) offset. There is no non-deterministic or unpredictable behavior whatsoever.

Re:GOTOphobia Considered Harmful (In C) by josefx on Monday February 27, 2023 @02:32AM (#34953970)
> operate predictably because they are deterministic operations

If I sat you in front of a computer generating numbers using a pseudo random number generator and gave you as context the last number it generated, could you make any prediction about the next number it generates?

Now if it used a prng that was known and standardized to only compute one number could you predict anything about the next number now?

Re:GOTOphobia Considered Harmful (In C) by lolinder on Monday February 27, 2023 @10:00AM (#34957172)
Predictably may have been the wrong word, because that does imply non-determinism. It might be better to say that CONTINUE and BREAK are limited: given a scope, the keyword can take you to exactly one place, while GOTO could be used to take you anywhere, and you have to go hunting for the corresponding label to find that place.