[TUHS] The UNIX Command Language (1976)

Bakul Shah bakul at iitbombay.org
Wed Dec 2 06:39:25 AEST 2020

On Dec 1, 2020, at 12:20 PM, Steffen Nurpmeso <steffen at sdaoden.eu> wrote:
> Never without my goto:, and if it is only to break to error
> handling and/or staged destruction of local variables after
> initialization failures.  Traumatic school impression, finding
> yourself locked in some PASCAL if condition, and no way to go to.

Pascal had goto. You can even do a non-local goto!

In Go you don't need goto for the sort of thing you and McVoy
talked about due to its defer statement and GC. Now granted
GC may be too big of a hammer for C/C++ but a future C/C++
add defer gainfully as the defer pattern is pretty common.
For example, mutex lock and unlock.

But I have mixed feelings about goto vs continue/break. A nested
loop with multiple continue/break can be as obscure. 

More information about the TUHS mailing list