[TUHS] What would early alternatives to C have been?

Rob Pike robpike at gmail.com
Mon Mar 10 11:19:44 AEST 2025


I have a shell script that helps:

% cat bin/ops

#!/usr/local/plan9/bin/rc

cat <<!

1 () [] -> . left

2 ! ~ ++ -- - (type) * & sizeof right

3 * / % left

4 + - left

5 >> << left

6 < <= > >= left

7 == != left

8 & left

9 ^ left

10 | left

11 && left

12 || left

13 ?: right

14 = op= right

15 , left

!

%


I used to use it regularly. Later I did the obvious followup:


% cat bin/goops

#!/bin/sh

cat <<!

6             *  /  %  <<  >>  &  &^

5             +  -  |  ^

4             ==  !=  <  <=  >  >=

3             <-

2             &&

1             ||

!

%


The difference besides the obvious is that it turned out I never need
goops. (Also gofmt uses spaces cleverly to show grouping.)


-rob
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.tuhs.org/pipermail/tuhs/attachments/20250310/08bda71d/attachment.htm>


More information about the TUHS mailing list