The Unix Heritage Society mailing list
 help / color / mirror / Atom feed
From: Warner Losh <imp@bsdimp.com>
To: segaloco <segaloco@protonmail.com>
Cc: The Eunuchs Hysterical Society <tuhs@tuhs.org>
Subject: [TUHS] Re: I can't drive 55: "GOTO considered harmful" 55th anniversary
Date: Thu, 9 Mar 2023 17:08:50 -0800	[thread overview]
Message-ID: <CANCZdfoMtP7vyjvO-jL0xVSNE8rWAjKx-zsvn+rDsOypmuYt2Q@mail.gmail.com> (raw)
In-Reply-To: <Fs7qQ6Hq_sW5O1YKxwENjl1yJtzkq11-w08iWn779gkGQBkl8FSJtbwwleoOTr8nCfFz-0vwIunzM6pql0dLTJ_OgQSgtTFqURi268Glupk=@protonmail.com>

[-- Attachment #1: Type: text/plain, Size: 3201 bytes --]

On Thu, Mar 9, 2023, 5:55 PM segaloco <segaloco@protonmail.com> wrote:

> I guess I hadn't considered deeply nested loops. I contort myself into a
> mental pretzel figuring out how to avoid GOTOs sometimes, maybe I could
> stand to embrace one every once in a while myself...
>

Yea. I recall a proposal to add break label; and the label could only be at
the end of a loop. The objection was why bloat the compiler with another
goto... I developed my restricted lack of fear after a stint in Java with
its multilevel break...

Warner


Now doing some research, more languages support GOTO than I thought,
> including C#, PHP, even Rust for all its safety orientation appears to at
> least muster a GOTO-ish construct. If people keep doing it, it must still
> be wanted, needed, and useful. I stand corrected on my never-GOTO attitude.
> Now to slip a GOTO into a work project and see how long it takes to get
> chastised :)
>
> - Matt G.
> ------- Original Message -------
> On Thursday, March 9th, 2023 at 3:54 PM, Warner Losh <imp@bsdimp.com>
> wrote:
>
> Oh also sometimes for breaking out of multiple levels of while/for loops.
> The alternatives are often worse.
>
> Warner
>
> On Thu, Mar 9, 2023, 4:31 PM Luther Johnson <luther@makerlisp.com> wrote:
>
>> I agree, unless I use setjmp/longjmp for that. Besides error recovery,
>> there are occasionally other times when we want to locally "return" to a
>> common state and start "from the top" again. I find such uses very clear in
>> their intent, and if commented well, not hard to follow at all - as long as
>> there is not more than one "top" :)
>> On 03/09/2023 04:21 PM, Warner Losh wrote:
>>
>>
>>
>> On Thu, Mar 9, 2023, 4:18 PM segaloco via TUHS <tuhs@tuhs.org> wrote:
>>
>>> GOTO is one of those paradoxical things where I would only trust the
>>> most sophisticated engineer to know when it's acceptable to use a GOTO but
>>> on the flip side would be suspicious of anyone claiming to be an engineer
>>> that uses any amount of GOTOs...
>>>
>>> Were any of the various GOTOs in languages ever meant to be any more
>>> than providing the same level of control that branch statements in assembly
>>> do? Was there ever some vision anyone's aware of concerning a
>>> sophisticated, dependable use of GOTOs? Since my first days poking around
>>> learning C GOTO has been mentally filed away as an assembly vestige for
>>> folks in transition, not a dependable construct in its own right. Any
>>> alternative camps out there?
>>>
>>
>>
>> In C I use it all the time to do goto err for common error recovery
>> because C doesn't have anything better.
>>
>> Warner
>>
>>> - Matt G.
>>>
>>> ------- Original Message -------
>>> On Thursday, March 9th, 2023 at 3:01 PM, Steffen Nurpmeso <
>>> steffen@sdaoden.eu> wrote:
>>>
>>>
>>> > I wonder if Pink Floyd's Summer68 maybe refers to this.
>>> > Other than that i am addicted and could not live without it.
>>> > The other (terrible) song is from 1984 (east southern US).
>>> >
>>> > --steffen
>>> > |
>>> > |Der Kragenbaer, The moon bear,
>>> > |der holt sich munter he cheerfully and one by one
>>> > |einen nach dem anderen runter wa.ks himself off
>>> > |(By Robert Gernhardt)
>>>
>>
>>
>

[-- Attachment #2: Type: text/html, Size: 6312 bytes --]

  reply	other threads:[~2023-03-10  1:09 UTC|newest]

Thread overview: 45+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-03-09 23:01 [TUHS] " Steffen Nurpmeso
2023-03-09 23:18 ` [TUHS] " segaloco via TUHS
2023-03-09 23:21   ` Warner Losh
2023-03-09 23:31     ` Luther Johnson
2023-03-09 23:44       ` josh
2023-03-09 23:54       ` Warner Losh
2023-03-10  0:54         ` segaloco via TUHS
2023-03-10  1:08           ` Warner Losh [this message]
2023-03-10 10:08             ` Ralph Corderoy
2023-03-10 11:37               ` arnold
2023-03-10 11:56                 ` Ralph Corderoy
2023-03-10 11:59                   ` arnold
2023-03-10 12:11                     ` Ralph Corderoy
2023-03-10  6:15     ` Dave Horsfall
2023-03-10 16:55       ` Steffen Nurpmeso
2023-03-10 17:02         ` Bakul Shah
2023-03-12 20:47         ` Dave Horsfall
2023-03-12 21:50           ` Warner Losh
2023-03-12 22:27             ` Steffen Nurpmeso
2023-03-13  3:09               ` [TUHS] Re: I can't drive 55: "GOTO considered harmful" 55thanniversary Dave Horsfall
2023-03-14 19:54                 ` Steffen Nurpmeso
2023-03-10  1:31   ` [TUHS] Re: I can't drive 55: "GOTO considered harmful" 55th anniversary Rich Morin
2023-03-10 11:37 Noel Chiappa
2023-03-10 15:54 ` Dan Cross
2023-03-12  7:39   ` Anthony Martin
2023-03-12 11:40     ` Dan Cross
2023-03-12 16:40       ` Paul Winalski
2023-03-13  3:25       ` John Cowan
2023-03-13 10:40         ` Alejandro Colomar (man-pages)
2023-03-13 12:19           ` Dan Cross
2023-03-10 11:51 Noel Chiappa
2023-03-10 14:16 ` Ronald Natalie
2023-03-10 14:39   ` John Cowan
2023-03-10 16:30   ` Phil Budne
2023-03-10 17:50     ` Steffen Nurpmeso
2023-03-10 17:57       ` Paul Winalski
2023-03-10 18:12         ` Lawrence Stewart
2023-03-10 17:28   ` Clem Cole
2023-03-10 17:54     ` Paul Winalski
2023-03-10 15:37 Noel Chiappa
2023-03-10 15:46 ` Larry McVoy
2023-03-10 16:04 ` Dan Cross
2023-03-10 18:55 ` Ron Natalie
2023-03-10 19:04   ` Dan Cross
2023-03-10 19:35     ` segaloco via TUHS

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=CANCZdfoMtP7vyjvO-jL0xVSNE8rWAjKx-zsvn+rDsOypmuYt2Q@mail.gmail.com \
    --to=imp@bsdimp.com \
    --cc=segaloco@protonmail.com \
    --cc=tuhs@tuhs.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).