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=-1.1 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,FREEMAIL_FROM,HTML_MESSAGE,MAILING_LIST_MULTI, RCVD_IN_DNSWL_NONE autolearn=ham autolearn_force=no version=3.4.4 Received: (qmail 5392 invoked from network); 15 Dec 2020 19:45:20 -0000 Received: from minnie.tuhs.org (45.79.103.53) by inbox.vuxu.org with ESMTPUTF8; 15 Dec 2020 19:45:20 -0000 Received: by minnie.tuhs.org (Postfix, from userid 112) id 241C49C824; Wed, 16 Dec 2020 05:45:18 +1000 (AEST) Received: from minnie.tuhs.org (localhost [127.0.0.1]) by minnie.tuhs.org (Postfix) with ESMTP id 306C49C81F; Wed, 16 Dec 2020 05:44:55 +1000 (AEST) Authentication-Results: minnie.tuhs.org; dkim=pass (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.b="EN6e6E/4"; dkim-atps=neutral Received: by minnie.tuhs.org (Postfix, from userid 112) id E894D9C81F; Wed, 16 Dec 2020 05:44:52 +1000 (AEST) Received: from mail-lf1-f46.google.com (mail-lf1-f46.google.com [209.85.167.46]) by minnie.tuhs.org (Postfix) with ESMTPS id 135469C81E for ; Wed, 16 Dec 2020 05:44:52 +1000 (AEST) Received: by mail-lf1-f46.google.com with SMTP id u18so42470661lfd.9 for ; Tue, 15 Dec 2020 11:44:51 -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=YgB0IKUlV/ikonD1MbFPn2YkUTrFROwh+Yjt83FxPLw=; b=EN6e6E/45aMy7WW9zhETBhImN9S/184+ySv9xQmt/fbzC0Mg3Lie8VX9B2O8kZrhcg chIJr5DFipNPAjLgpKzr4WTV8dWYOg+0N7upeEKX/Ha90YDojzZr0iS0H85aMvptaGly k8VsOlygq+qxpvq236DSY33XX3RVzi7HqmOddhuP382BOZE5a7unS14y9Zgu6D1mVQfa UYZq+lan5jywzz7fxzhpWTQuVevgxPpgvswjV8u2DVlmoZlDsenVMQiwvHrcvyfs62qA aQEpI6M7fmKpVaL7/awyup1DkgT2mzW0yG8WFmpOsop4wip3itoQt30Czs7tXez5gYCO UYxg== 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=YgB0IKUlV/ikonD1MbFPn2YkUTrFROwh+Yjt83FxPLw=; b=j/W5flpNZJVyNkhixIJ+0exDflff9uZH8ph/WBl7x94RhrbF01glqHyRwku6BPkVCF JlHaLFXhojrDqKwQot0r6epu3amLC6CttXzS2qY2WJuk7MHdo5uaGQfiwWZLI3x8w29E JsA99px55kp6I7M6s+8NPJLr68l87/1DZb4kmEK2R6WOV5vxSDBMZ9hyJkMCKA3SNdiu Vn2JtcS3TsVjTYX9DrJa08e7k3U5Vtp/tLQ++JSoUlt35la99SMB7UjwMB72qZafri0S vL0ckYuvAlIGQJQNrjUMPkC3MR4YoZgcE63c8yBSfoT0nZ6oQDuXhVEE2ozSINvtXD77 rNeA== X-Gm-Message-State: AOAM530u3ic2Rsolkh3P0uyqNOxcUrhwCo3oBDxXywfu62AZ6xlCsCID 1bM7xhrZKMv+oeuVqDmxSPGgjotK7OscitXNgI5/13eA X-Google-Smtp-Source: ABdhPJzat4t7xBI0Gn7N4xtU/mSGwkCcgVrYyQ8rdS64tAlBNWG8CQj0t3ksNDJmag+Owwd61enqNiLxDhxZ1zqXc1w= X-Received: by 2002:a19:cbd4:: with SMTP id b203mr12069493lfg.506.1608061490520; Tue, 15 Dec 2020 11:44:50 -0800 (PST) MIME-Version: 1.0 References: In-Reply-To: From: Ken Thompson Date: Tue, 15 Dec 2020 11:44:39 -0800 Message-ID: To: srb@acm.org Content-Type: multipart/alternative; boundary="000000000000eb682305b685fd9c" Subject: Re: [TUHS] sh and goto 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@minnie.tuhs.org Errors-To: tuhs-bounces@minnie.tuhs.org Sender: "TUHS" --000000000000eb682305b685fd9c Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable it was the right thing to do. wish i had thought of it. i was too busy saving bytes. On Tue, Dec 15, 2020 at 8:03 AM srbourne wrote: > Message: 4 > > Date: Mon, 30 Nov 2020 19:59:18 -0800 (PST) > From: jason-tuhs@shalott.net > To: tuhs@minnie.tuhs.org > Subject: Re: [TUHS] The UNIX Command Language (1976) > Message-ID: > > Content-Type: text/plain; charset=3D"utf-8"; Format=3D"flowed" > > > > "The UNIX Command Language is the first-ever paper published on the Unix > shell. It was written by Ken Thompson in 1976." > https://github.com/susam/tucl > > Thanks for that. > > This reminded me that the Thompson shell used goto for flow control, whic= h > I had forgotten. > > Bourne commented on the omission of goto from the Bourne shell, "I > eliminated goto in favour of flow control primitives like if and for. > This was also considered rather radical departure from the existing > practice." > > Was this decision contentious at all? Was there a specific reason for > goto's exclusion in the Bourne shell? > > > Thanks. > > > -Jason > > > At the time it may have raised a few eyebrows but I don't recall much dis= cussion about it then. My email tracks at the time don't mention it. > Doug McIlroy or Steve Johnson (or Ken) on this forum might recall differe= ntly. At the time scripts were not that complicated and so error recovery = to a far off place in the script was not common. As an aside I did persuad= e Dennis to add "setjmp" and "longjmp" so the shell code itself could recov= er from some kinds of script errors. > So I did not have a "religious" aversion to "goto" at the time. > > Steve > > --000000000000eb682305b685fd9c Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
it was the=C2=A0right thing to do.
wish i had thought = of it.
i was too busy saving bytes.

On Tue, D= ec 15, 2020 at 8:03 AM srbourne <s= rbourne@gmail.com> wrote:
=20 =20 =20
Message: 4
Date: Mon, 30 Nov 2020 19:59:18 -0800 (PST)
From: jason-tuh=
s@shalott.net
To: tuhs@minnie.t=
uhs.org
Subject: Re: [TUHS] The UNIX Command Language (1976)
Message-ID:
	<alpine.LRH.2.23.453.2011301946410.14253@waffle.sh=
alott.net>
Content-Type: text/plain; charset=3D"utf-8"; Format=3D"flowe=
d"


"The UNIX Command Language=C2=A0is the first-ever paper p=
ublished on the Unix=20
shell. It was written by Ken Thompson in 1976."

https://github.=
com/susam/tucl
Thanks for that.

This reminded me that the Thompson shell used goto for flow control, which=
=20
I had forgotten.

Bourne commented on the omission of goto from the Bourne shell, "I=20
eliminated goto in favour of flow control primitives like if and for.=20
This was also considered rather radical departure from the existing=20
practice."

Was this decision contentious at all?  Was there a specific reason for=20
goto's exclusion in the Bourne shell?


Thanks.


  -Jason

At the time it may have raised a few eyebrows but I don't reca=
ll much discussion about it then.  My email tracks at the time don't me=
ntion it.
Doug McIlroy or Steve Johnson (or Ken) on this forum might recall different=
ly.  At the time scripts were not that complicated and so error recovery to=
 a far off place in the script was not common.  As an aside I did persuade =
Dennis to add "setjmp" and "longjmp" so the shell code =
itself could recover from some kinds of script errors.
So I did not have a "religious" aversion to "goto" at t=
he time. =20

Steve
--000000000000eb682305b685fd9c--