From: Ken Thompson <kenbob@gmail.com>
To: srb@acm.org
Cc: tuhs@minnie.tuhs.org
Subject: Re: [TUHS] sh and goto
Date: Tue, 15 Dec 2020 11:44:39 -0800 [thread overview]
Message-ID: <CAMP=X_mrdar5j3v0_wuDTEQdSyyVsNdOv4_fcL8BtGdRCHP_eg@mail.gmail.com> (raw)
In-Reply-To: <dfc883e8-beaf-ef14-8101-2f8ff4eeb145@gmail.com>
[-- Attachment #1: Type: text/plain, Size: 1799 bytes --]
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 <srbourne@gmail.com> 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:
> <alpine.LRH.2.23.453.2011301946410.14253@waffle.shalott.net> <alpine.LRH.2.23.453.2011301946410.14253@waffle.shalott.net>
> Content-Type: text/plain; charset="utf-8"; Format="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, which
> 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 discussion 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 differently. 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 the time.
>
> Steve
>
>
[-- Attachment #2: Type: text/html, Size: 2578 bytes --]
next prev parent reply other threads:[~2020-12-15 19:45 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-12-15 16:02 srbourne
2020-12-15 19:44 ` Ken Thompson [this message]
2020-12-15 23:27 ` George Michaelson
2020-12-16 4:30 ` Richard Salz
2020-12-16 4:41 ` George Michaelson
2020-12-16 4:01 M Douglas McIlroy
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='CAMP=X_mrdar5j3v0_wuDTEQdSyyVsNdOv4_fcL8BtGdRCHP_eg@mail.gmail.com' \
--to=kenbob@gmail.com \
--cc=srb@acm.org \
--cc=tuhs@minnie.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).