News for hackers. Stuff that matters.
Re:We Are Sorry to Inform You (2005) by tinus_hn on Saturday June 18, 2022 @07:02AM (#31788772)
Structured programming makes perfect sense in lieu of the rather silly rejection in this article that holds no more water than ‘Fortran has goto and no structured programming and that is what I’m used to’.
Re:We Are Sorry to Inform You (2005) by munchenphile on Saturday June 18, 2022 @07:23AM (#31788858)
goto makes sense in C for cleanup of local resources. Passing a bunch of pointers to pointers to another function for cleanup makes code far less readable (jumping around in a source file instead of just reading code linearly and freeing local resources in the scope in which they were allocated). Basically, forcing structured programming over using goto is the anti-lambda — requiring a lot of jumping around in the SOURCE file (not necessarily the binary) instead of linearly scanning through the code.

Dijkstra was wrong with his “goto” paper. It’s fine to admit that. He was right about most other things.

Re:We Are Sorry to Inform You (2005) by tinus_hn on Saturday June 18, 2022 @07:38AM (#31788972)
Sure, there are uses. But they are not in this article. The article argues that without goto, an if statement can only conditionally execute one statement.

> The paper doesn't explain to us what would be the use of the "if" statement without a "goto" to redirect the flow of execution: Should all our postconditions consist of a single statement[…]?

Re:We Are Sorry to Inform You (2005) by jstanley on Saturday June 18, 2022 @08:02AM (#31789100)
Yes, the article is a joke.