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, RCVD_IN_DNSWL_NONE autolearn=ham autolearn_force=no version=3.4.4 Received: (qmail 321 invoked from network); 1 Dec 2020 20:15:38 -0000 Received: from minnie.tuhs.org (45.79.103.53) by inbox.vuxu.org with ESMTPUTF8; 1 Dec 2020 20:15:38 -0000 Received: by minnie.tuhs.org (Postfix, from userid 112) id 756039C203; Wed, 2 Dec 2020 06:15:29 +1000 (AEST) Received: from minnie.tuhs.org (localhost [127.0.0.1]) by minnie.tuhs.org (Postfix) with ESMTP id 4C0419B55C; Wed, 2 Dec 2020 06:15:04 +1000 (AEST) Authentication-Results: minnie.tuhs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.b="AlVrc+Ti"; dkim-atps=neutral Received: by minnie.tuhs.org (Postfix, from userid 112) id 6546994915; Wed, 2 Dec 2020 06:13:50 +1000 (AEST) Received: from mail-lj1-f169.google.com (mail-lj1-f169.google.com [209.85.208.169]) by minnie.tuhs.org (Postfix) with ESMTPS id 6FD0594843 for ; Wed, 2 Dec 2020 06:13:49 +1000 (AEST) Received: by mail-lj1-f169.google.com with SMTP id r18so5221997ljc.2 for ; Tue, 01 Dec 2020 12:13:49 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=bWYePPFXJc2DJMMluHpN6q4q7CLZzb4NGao8t1C4ZO8=; b=AlVrc+TiYUWggIkZ3jHfzjja5F9btlUrMhLFc3vHxVH6F8ju3dHjPL6yybFAHMaiZR wcYtKgDgcTO1liNjm6hnWxCq3bNkRrxJANN7cQWr+Jy7+ErKeSfiq4TxUIvKIV6vmskc SyXx8glQIoMLu23qFZOSQm/+be35uLEDqkoaFjiKSCdZE/A/ZozRjM36bqFlTOq+2H0Z Hj3fIA7wt+OGeF5h4hQVcDmkXb0ZJEdqXeBprVawn/Ko0sBhcPOCZDiIlGO6W63CHQJo yI9zD0Gql2Z1Zz5t8P3LK6JDH36tSbtBQ4iLJmfkUWY/vjbCa4Hp4ZlsBVXZJQXcbd1L czrA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=bWYePPFXJc2DJMMluHpN6q4q7CLZzb4NGao8t1C4ZO8=; b=LEpTOeqTjFCnqBOfFB8RtfYQYHroEe0JGiWqcBq2Xtt0DwcGmePV08iov07TJdmlcu C/ULw9nCoWlaxKDT2sh+JLjHN+pdShLIeYsq4lvFpBLNhpAOAoRRe2Zq3bvxdkGpBJyJ +tE6BWYAzuVmjSqVMlhhBtrD7MidlBtcT4IFdj9FHzOcQhtDab34lxl4YYhDczlhl6ok NjGKZKniWdaZcE/LzJgSoOTCoY92YsGgWtx6EbcSvgz5N0DnCk5O19HRkwNV67iXBxrT zgejRitSDZnIGIyWoHqSDpNondfMrYNdc1G7HJUT9Hj8Cs23zFxF015iO4ePt90T88e+ UbfQ== X-Gm-Message-State: AOAM533Upavu8SF6yplLTgRa/q2BXQ9Umw3sZCFn00LVT8FlB+P8rK13 DKNf1tGio0ce3jFi+1gPeQVcnx7unua9bgZC5JI= X-Google-Smtp-Source: ABdhPJxdwGaXflk8JmHg/TQ+X6KlY6Jze3cIt1D5/7wF3q1ZmnpJjYl2/zHpK3AW+T3cPUZTqI/XxvxMOo72ruwP/50= X-Received: by 2002:a05:651c:1213:: with SMTP id i19mr2092738lja.407.1606853627685; Tue, 01 Dec 2020 12:13:47 -0800 (PST) MIME-Version: 1.0 References: <15511090.6330.1606835354160.JavaMail.root@zimbraanteil> <202012011538.0B1FcLi5023858@freefriends.org> <202012011639.0B1GdjcD031722@freefriends.org> In-Reply-To: <202012011639.0B1GdjcD031722@freefriends.org> From: Rob Pike Date: Wed, 2 Dec 2020 07:13:36 +1100 Message-ID: To: Aharon Robbins Content-Type: multipart/alternative; boundary="000000000000af2e8905b56cc3d8" Subject: Re: [TUHS] The UNIX Command Language (1976) X-BeenThere: tuhs@minnie.tuhs.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: The Unix Heritage Society mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: TUHS main list Errors-To: tuhs-bounces@minnie.tuhs.org Sender: "TUHS" --000000000000af2e8905b56cc3d8 Content-Type: text/plain; charset="UTF-8" Go lets you say "Loop: for ..." and then "break Loop". -rob On Wed, Dec 2, 2020 at 3:40 AM wrote: > > On Tue, Dec 1, 2020 at 8:39 AM wrote: > > > It was recognized that goto was not necessary if one had proper control > > > structures in a language (if/else, while), and that code with no (or > > > minimal) gotos was easier to read and understand. > > Warner Losh wrote: > > This is true for simple flow control. However, when you had to break out > of > > multiple levels, or continue not the inner loop, but the middle loop, the > > use of extra booleans sure made the code less understandable than a > 'goto' > > a label that stood in for that purpose... This was something that wasn't > > well understood by language designers, and even today C and C++ neither > > have good flow control beyond the basics. Even though both break and > > continue could take an optional count without breaking old code.... > > Quite true. Modern Bourne shells let you supply a number to break and > continue to specify how many loops to break. Ada, or maybe it was one of > the Modula-X languages, let you put a label on a loop so that you could > say `continue outer' or `break outer' and not need the booleans. > > This is something that newer languages (C#, Java, Go, ...) could have > picked > up but didn't, which I think is too bad. > > Arnold > --000000000000af2e8905b56cc3d8 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
Go lets you say "Loop: for ..." and then "b= reak Loop".

-rob


On Wed, Dec 2,= 2020 at 3:40 AM <arnold@skeeve.com= > wrote:
= > On Tue, Dec 1, 2020 at 8:39 AM <arnold@skeeve.com> wrote:
> > It was recognized that goto was not necessary if one had proper c= ontrol
> > structures in a language (if/else, while), and that code with no = (or
> > minimal) gotos was easier to read and understand.

Warner Losh <imp@bsd= imp.com> wrote:
> This is true for simple flow control. However, when you had to break o= ut of
> multiple levels, or continue not the inner loop, but the middle loop, = the
> use of extra booleans sure made the code less understandable than a &#= 39;goto'
> a label that stood in for that purpose... This was something that wasn= 't
> well understood by language designers, and even today C and C++ neithe= r
> have good flow control beyond the basics. Even though both break and > continue could take an optional count without breaking old code....
Quite true. Modern Bourne shells let you supply a number to break and
continue to specify how many loops to break.=C2=A0 Ada, or maybe it was one= of
the Modula-X languages, let you put a label on a loop so that you could
say `continue outer' or `break outer' and not need the booleans.
This is something that newer languages (C#, Java, Go, ...) could have picke= d
up but didn't, which I think is too bad.

Arnold
--000000000000af2e8905b56cc3d8--