[TUHS] sh and goto

M Douglas McIlroy m.douglas.mcilroy at dartmouth.edu
Wed Dec 16 14:01:39 AEST 2020

> Bourne commented on the omission of goto from the Bourne shell
> Was this decision contentious at all? Was there a specific reason for goto's exclusion in the Bourne shell?

I don't believe I ever used a shell goto, because I knew
how it worked--maybe even spinning a tape drive, not too
different from running a loop on the IBM CPC. There you
stood in front of the program "read head" (a card reader),
grabbed the "used" cards at the bottom and put them back
in the top feed. Voila, a program loop. The shell goto
differed in that it  returned to the beginning by running the
tape backward rather than going around a physically
looped path. And you didn't have to spin the tape by hand.

It also reminds me of George Stibitz's patent on the goto.
The idea there was to stop reading this tape and read
that one instead. The system library was a bank of
tape readers with programs at the ready on tape loops .
(This was in the late 1940s. I saw the machine but never
used it. I did have hands-on experience with CPCcards.)


More information about the TUHS mailing list