From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on inbox.vuxu.org X-Spam-Level: X-Spam-Status: No, score=-0.8 required=5.0 tests=DKIM_ADSP_CUSTOM_MED, DKIM_INVALID,DKIM_SIGNED,FREEMAIL_FROM,HTML_MESSAGE,MAILING_LIST_MULTI autolearn=ham autolearn_force=no version=3.4.4 Received: (qmail 30493 invoked from network); 9 Mar 2023 23:44:29 -0000 Received: from minnie.tuhs.org (50.116.15.146) by inbox.vuxu.org with ESMTPUTF8; 9 Mar 2023 23:44:29 -0000 Received: from minnie.tuhs.org (localhost [IPv6:::1]) by minnie.tuhs.org (Postfix) with ESMTP id 0CCD54135D; Fri, 10 Mar 2023 09:44:25 +1000 (AEST) Received: from mail-yw1-x112c.google.com (mail-yw1-x112c.google.com [IPv6:2607:f8b0:4864:20::112c]) by minnie.tuhs.org (Postfix) with ESMTPS id 9D8BF4135A for ; Fri, 10 Mar 2023 09:44:15 +1000 (AEST) Received: by mail-yw1-x112c.google.com with SMTP id 00721157ae682-536b7ffdd34so65686187b3.6 for ; Thu, 09 Mar 2023 15:44:15 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; t=1678405454; h=cc:to:subject:message-id:date:from:references:in-reply-to :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=6pYmiZH4NZtJ3G27FZvhl7rhe8wUlRaJSKxXkk7v6qo=; b=e7PpVBoCirDvHbB3HcBF8vhLcatMkKQJCO8nOn2bqPwwUVS0pBiYvzwQ4gUdc4miZD vI20YrwlU5efvWb+e2ePDLpdlY8zXPU+z/sMTin1ktsIJXou84oc5AWXUqzWl0BlFq7/ eOghcYJOebfOQ5dSOyfD/GEmndzMSrEfIFiWMaUo8cuF83AmGZ/2mcNqwYYPjvt7cL/R xBOHp68d2Q2bxAK/K1voJKGQOCPptDLa3G5X9sYKm1QWFX6kCYj6+EP5r4CfOze/OpOz 3X6sxpehDWrYbPj3yILj0G+1jpQqiHhVNvuQUFZE5cFQYXu9qLmKC8tc6mJJ64XXQEj+ G1Xw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; t=1678405454; h=cc:to:subject:message-id:date:from:references:in-reply-to :mime-version:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=6pYmiZH4NZtJ3G27FZvhl7rhe8wUlRaJSKxXkk7v6qo=; b=xDhG4z5WeCr+hKIHFbj85Ynxzh/R1b+kYdqbgL08rqPOBPNzzaQcAtJana9KXA1Cnj ySlPyHtTwhtzrJyUHn3sQMGnTbcIRQD1C5QQOZiCbWe0aqCr7tvgasGh2mvdk8UnY292 EFzSBl1loA4coz77ljeGixLXv/M2T7Jtcgfb/VJOacaspE4Oo7mxnYcVyU+XY26gTdyT TGlGTZiVuhK2AON8dj+e7d41mQ+mRZvmljAkxCWR5o8+OGJCpBRQfUzRmXbMWm7BfET4 wuBf0Mkcr5kY6OE+eAHRRE6acaEi18ml3shc4Epju3AD3bh20M658psrYcsyo/0N2dnR Ffog== X-Gm-Message-State: AO0yUKXiuBce/QqxASeo4oTNpdr73TwePVDXnflw9aE2UfTilipYdeno YRxhBW7om3FwjQYqjHpdDUElssN0AWHGDBrIMhzZfZaaWmQ= X-Google-Smtp-Source: AK7set9BmwY9OHH6ruxcYp6s4pPCstUV6eH1CwRQVGr93HFsIxU2sA3CMonXvbbnlr6zb+ZSkEUs0E2VKpDux1J3+7o= X-Received: by 2002:a81:af62:0:b0:524:dafd:c5b3 with SMTP id x34-20020a81af62000000b00524dafdc5b3mr14854633ywj.1.1678405454355; Thu, 09 Mar 2023 15:44:14 -0800 (PST) MIME-Version: 1.0 Received: by 2002:a05:7010:c98c:b0:321:de2a:9fdb with HTTP; Thu, 9 Mar 2023 15:44:13 -0800 (PST) In-Reply-To: <849f8da7-8df2-619c-6080-d40d0ef6fc57@makerlisp.com> References: <20230309230130.q4I-f%steffen@sdaoden.eu> <849f8da7-8df2-619c-6080-d40d0ef6fc57@makerlisp.com> From: josh Date: Thu, 9 Mar 2023 18:44:13 -0500 Message-ID: To: Luther Johnson Content-Type: multipart/alternative; boundary="000000000000e5643105f68038bf" Message-ID-Hash: B2UYBNSXZ2HMYMD65K7IH3EXSYQGOJ3F X-Message-ID-Hash: B2UYBNSXZ2HMYMD65K7IH3EXSYQGOJ3F X-MailFrom: joshnatis0@gmail.com X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; emergency; loop; banned-address; member-moderation; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; digests; suspicious-header CC: "tuhs@tuhs.org" X-Mailman-Version: 3.3.6b1 Precedence: list Subject: [TUHS] Re: I can't drive 55: "GOTO considered harmful" 55th anniversary List-Id: The Unix Heritage Society mailing list Archived-At: List-Archive: List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: --000000000000e5643105f68038bf Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable This blog post compares the clarity of a number of programs written with goto vs. with other control flow methods: https://blog.joren.ga/gotophobia-harmful Knuth=E2=80=99s =E2=80=9CStructured Programming with go to Statements=E2=80= =9D argues that we eventually missed the main point of structured programming by focusing too much on goto. https://pic.plover.com/knuth-GOTO.pdf Error handling (especially in loops or when releasing resources in non-RAII languages) and implementing state machines are commonly brought up as cases where goto is more fitting than common =E2=80=9Cstructured=E2=80=9D control= flow statements. I think some newer languages like Zig extend the =E2=80=9Cbreak= =E2=80=9D mechanism to let you break to a label, so that sort of covers the first case. Josh --000000000000e5643105f68038bf Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable This blog post compares the clarity of a number of programs written with=C2= =A0goto vs. with other control flow methods:=C2=A0https://blog.joren.ga/gotophobia-harmful
Knuth=E2=80=99s =E2=80=9CStructured Programming with go to= Statements=E2=80=9D argues that we eventually missed the main point of str= uctured programming by focusing too much on goto.=C2=A0https://pic.plover.com/knuth-GOTO.pdf

Error handling (especially in loops or when releasing= resources in non-RAII languages) and implementing state machines are commo= nly brought up as cases where goto is more fitting than common =E2=80=9Cstr= uctured=E2=80=9D control flow statements. I think some newer languages like= Zig extend the =E2=80=9Cbreak=E2=80=9D mechanism to let you break to a lab= el, so that sort of covers the first case.

Josh --000000000000e5643105f68038bf--