<div dir="ltr"><div dir="ltr"><div class="gmail_default" style="font-family:arial,helvetica,sans-serif"><br></div></div><br><div class="gmail_quote gmail_quote_container"><div dir="ltr" class="gmail_attr">On Sun, Mar 9, 2025 at 3:42 PM G. Branden Robinson <<a href="mailto:g.branden.robinson@gmail.com">g.branden.robinson@gmail.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">Hi Clem,<br>
<br>
Thanks for you detailed response. </blockquote><div><span class="gmail_default" style="font-family:arial,helvetica,sans-serif"><font color="#0000ff">Most welcome.</font></span></div><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"> I appreciate getting perspectives<br>
from people who fought in the wars I'm too young to remember; I visit<br>
the memorials and try to imagine what things were like.<br></blockquote><div><font color="#0000ff"><span class="gmail_default" style="font-family:arial,helvetica,sans-serif">I think a huge issue is your introduction to computing was on a PC, not on a mainframe or even a mini.</span> <span class="gmail_default" style="font-family:arial,helvetica,sans-serif"> IMHO the #1 biggest issue with the PC were so little learnings from either systems was used and so much was re-invented.  As some on once said, instead of standing on the shoulders of the giants from before, computer scientists seems to step each other other toes.</span></font></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><br>
Hmm, I can already see that I might have confused ISO Standard Pascal<br>
(ISO 7185) with ISO Extended Pascal (ISO 10206).  Both standards, but<br>
only one named "Standard".  I apologize for my error.<br></blockquote><div><span class="gmail_default" style="font-family:arial,helvetica,sans-serif"><font color="#0000ff">No worries, by 1990 when ISO 10206 came about, Pascal had already morphed even by Wirth himself.  I liked Modula-II  (and so called Mod-III  the DEC SRC implementation).   One of my favorite early workstations was Wirth's Lilith a Mod-22 based system that was an Alto clone like  the Perq (a.k.a the PascAlto).</font></span></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><br>
<br>
That's also a flaw, but C doesn't distinguish itself strongly here;<br>
`static` function linkage should have been the default. </blockquote><div><div class="gmail_default" style="font-family:arial,helvetica,sans-serif"><font color="#0000ff">You can argue both ways.   Asmblers of the day worked like C did.</font></div><br></div><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><br>
But that was true of C for a long time as well; as I understand it,<br></blockquote><div><font color="#0000ff"><span class="gmail_default" style="font-family:arial,helvetica,sans-serif">Hmm look at the sources or at least at Dennis' Tour document.</span> <span class="gmail_default" style="font-family:arial,helvetica,sans-serif"> Ken or Steve Bourne can correct me he as I started  with Fifth Edition and pretty sure Dennis' compiler was multipass.  Some passed were separate programs due to the address space limits of the PDP-11.  But by 1978 and Typesetter C, much less 80/81 when Brian and PJ did SW  Tools in Pascal, Brian's statement hold.</span></font></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><br>
And for me, writing to minimize forward declarations _is_ the natural<span class="gmail_default" style="font-family:arial,helvetica,sans-serif"> </span>order. </blockquote><div><span class="gmail_default" style="font-family:arial,helvetica,sans-serif"><font color="#0000ff">Hey, I was taught that way also.  I knew FORTRAN, Algol-W,  SAIL, BLISS, as well as Pascal (much less a few assembler languages) before I learned C and the PDP-11.  The White book did not exist, BTW.</font></span><font color="#0000ff"> </font><span class="gmail_default" style=""><font color="#0000ff" style="font-family:arial,helvetica,sans-serif">I started learning before Lesk's IO library - although we got  V6, I  have few memories of anything interesting by me being written without using Lesk's library or later</font><font color="#38761d" style="" face="monospace"> libS.a</font><font color="#0000ff" style="font-family:arial,helvetica,sans-serif"> from Typesetter C.  I understand Brian's complaint, and coming from Ratfor/FORTRAN, Pascal's rigor certainly would have been awkward, but I liked having the flexibility that C provided. Frankly, I hate more modern C code when the first thing you see is a lot of functions, and then main() is declared much later. But then again, I like to keep main() and maybe one or two primary functions in the program.c file and all my subroutines in either subr.c or like, then in program.h declare everything.</font></span></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
<br><br>
> 5. The order of logical expression evaluation cannot be controlled,<br>
> which leads to convoluted code and extraneous variables.<br>
<br>
Some of this blows back onto C.  Yes, short-circuit logical evaluation<br>
operators are desirable, </blockquote><div><div class="gmail_default" style="font-family:arial,helvetica,sans-serif"><font color="#0000ff">Absolutely.</font></div><br></div><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">but apart from that the order of expression<br>
evaluation in C (a) is frequenly not specified so that compilers can<br>
generate fast code for the hardware; or (b) demands that the programmer<br>
remember something like 15 levels of operator precedence, which is<br>
savage cruelty in my opinion.<br></blockquote><div><span class="gmail_default" style="font-family:arial,helvetica,sans-serif"><font color="#0000ff">That's more about the implementation of a coding style. Post students of Wulf's Green Book, the compiler should not care. It should generate optimal code.  Anyway, I frankly prefer to see explicit parens, so the precedence is clear — it's easier to read and less error-prone</font></span><font color="#0000ff"><span class="gmail_default" style="font-family:arial,helvetica,sans-serif"> for the maintainer.</span></font></div><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
<br>
Still, scanf() was a bad idea, or at least overapplied, </blockquote><div class="gmail_default" style="font-family:arial,helvetica,sans-serif"><font color="#0000ff">Remember printf() and scanf() come from FORTRAN in heritage. The idea was that the format statements worked in both places. I'll not argue that scanf() is a mess; I have generally avoided it.</font></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">and should not<br>
be taught to students as a tool for interactive I/O handling (as it was<br>
to me--did anyone else have this misfortune?). </blockquote><div><div class="gmail_default" style="font-family:arial,helvetica,sans-serif"><font color="#0000ff">I seriously hope you were not given the C Programming Language as a teaching language — shame on your instructors. We don't put new pilots in an F15. Even in the military, they start on straightforward fixed-wing aircraft similar to the Piper Cub or Cessna 150 [just as my father did when he was a fighter instructor for the Army in the 1940s, BTW].   </font></div><div class="gmail_default" style="font-family:arial,helvetica,sans-serif"><font color="#0000ff"><br></font></div><div class="gmail_default" style="font-family:arial,helvetica,sans-serif"><font color="#0000ff">Use the tools for what they were designed for. I still think Pascal is the best teaching  language around, and Clancy and Cooper's book "Oh Pascal" is the best way to introduce programmers to systems thinking. But give them professional tools as they start to do harder things, and their skills will improve.</font></div><div class="gmail_default" style="font-family:arial,helvetica,sans-serif"><font color="#0000ff"><br></font></div><div class="gmail_default" style="font-family:arial,helvetica,sans-serif"><font color="#0000ff">It's funny as she has since graduated college and works for a local SW firm, but a young woman I mentored a few years ago; I taught her using "Oh Pascal" while her HS was trying to use C++ (and she was very confused by it - the teacher was poor and the book wasn't great either — Dietel and Dietel).  She later went to WPI, and she thanked me for "forcing her" to learn to do the simple stuff and understand it.   She saw  Java in college courses, and things made much more sense to her.</font></div><br></div><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"> For that, a simple<br>
lexical analyzer is necessary because humans produce undisciplined<br>
input.  It's never too early to teach a beginner how to write a finite<br>
state machine.<br></blockquote><div><span class="gmail_default" style="font-family:arial,helvetica,sans-serif"><font color="#0000ff">I agree — everyone should write for their first compiler in Pascal for a simple language and no cheating using YACC.  You need to write the whole thing if you want to understand how parsing really works.</font></span><font color="#0000ff"> </font></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><br>I guess standardization of Pascal started too late; but both C</blockquote><div><div class="gmail_default" style="font-family:arial,helvetica,sans-serif"><font color="#0000ff">There was a standard. Everyone had the sources to Dennis and later Steve's compilers.  😉</font></div><br></div><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"> and C++<span class="gmail_default" style="font-family:arial,helvetica,sans-serif"> </span>took a long time to get to their initial standards too.  What do you<br>
think accounts for C and C++'s greater success, in the specific sense<br>
that vendor extensions didn't cripple the language's development?  What<br>
force kept these languages better governed?<br></blockquote><div><font color="#0000ff"><span class="gmail_default" style="font-family:arial,helvetica,sans-serif">In C's case, the committees were controlled as long as Dennis was there. Two of Dennis's most famous quotes are:  <i>"When I read commentary about suggestions for where C should go, I often think back and give thanks that it wasn't developed under the advice of a worldwide crowd."</i> </span> <span class="gmail_default" style="font-family:arial,helvetica,sans-serif">and <i> </i></span><i>“C is quirky, flawed, and an enormous success.”</i></font></div><div><font color="#0000ff"><i><br></i></font></div><div><font color="#0000ff"><span class="gmail_default" style="font-family:arial,helvetica,sans-serif">I find where the C standard folks falling into the C++ trap and letting people pee it. CC++ is a  disaster — primarily because everyone added their favorite feature.   That's while I like Go for applications work, and if I were to do OS (near the HW development)  today and not use C, I would have to consider Rust.</span><br></font></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><br>
<br>
I've read Lindsey's "A history of ALGOL 68" in HOPL 2 (1996).<br>
Intriguing stuff.  I have no strong opinions about any of it, probably<br>
because no one's either forced me to write in ALGOL 68, nor forbidden me<br>
from doing so.  I do admire its nearly universal loop structure:<br></blockquote><div><span class="gmail_default" style="font-family:arial,helvetica,sans-serif"><font color="#0000ff">I'll leave it to srb to reply to that. CMU  had a budding A68 team led by Peter Hibbard, but I never used it. I had Peter for compilers, so we read a number of the papers at the time, but after I graduated, work that led to Ada had started.   I liked what I saw with Red; it follows 'Tartan,' which Wulf and his students, like Hilfiger, put together. as a "Hail Mary" when it started to be clear Green was going to "win."  When  I was a grad student, and Paul had finished his PhD and started teaching at UCB,  I took his comparative language seminar.   I learned to hate Ada  (<i>a.k.a.</i> "Green")  a bit less.  But that's  a different email thread with fewer Unix orientations, so it belongs elsewhere. </font></span></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
<br><br>
That was still a live issue when I was learning, but back then (on home<br>
8-bit micros), you had to shell out money to get anything but the BASIC<br>
interpreter that was stored in ROM. <br></blockquote><div><font color="#0000ff"><span class="gmail_default" style="font-family:arial,helvetica,sans-serif">I understand. The more significant issue is that "production quality" compilers did not target those systems (yet).   This came  up a while back on Quora:    </span><a href="https://www.quora.com/When-did-C-compilers-start-generating-optimized-code-that-runs-faster-than-average-assembly-programmers-code/answer/Clem-Cole">https://www.quora.com/When-did-C-compilers-start-generating-optimized-code-that-runs-faster-than-average-assembly-programmers-code/answer/Clem-Cole</a></font></div><div><br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">I'd like to talk to some of that cohort about Ada.<br></blockquote><div><span class="gmail_default" style="font-family:arial,helvetica,sans-serif"><font color="#0000ff">Sure, move it, COFF.</font></span></div><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><br>
That shocks me, but okay<span class="gmail_default" style="font-family:arial,helvetica,sans-serif"> </span> <span class="gmail_default" style="font-family:arial,helvetica,sans-serif">... </span>  What am<span class="gmail_default" style="font-family:arial,helvetica,sans-serif"> </span>I missing?<br></blockquote><div><span class="gmail_default" style="color:rgb(0,0,255);font-family:arial,helvetica,sans-serif">Simple: a different set of problems at the time.</span><font color="#0000ff"> </font><span class="gmail_default" style="font-family:arial,helvetica,sans-serif"><font color="#0000ff"> Read my answer: </font></span><font color="#0000ff"><a href="https://www.quora.com/How-did-we-make-the-first-computer-operating-system-if-we-didnt-have-computers-to-make-them-on/answer/Clem-Cole">https://www.quora.com/How-did-we-make-the-first-computer-operating-system-if-we-didnt-have-computers-to-make-them-on/answer/Clem-Cole</a></font></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
<br><br>
<br>
...Thompson had a hand in writing that one, didn't he?  During his<br>
sabbatical that spawned the CSRG?  If so, that was 1975.<br></blockquote><div><font color="#0000ff"><span class="gmail_default" style="font-family:arial,helvetica,sans-serif">Pascal escapes  UCB</span> <span class="gmail_default" style="font-family:arial,helvetica,sans-serif">with what we now call "1BSD," the original  BSD tape that Joy wrote either 77 or 78.   It's written in a flavor  of pre-typesetter C - which was a UCB modified V6 dmr compiler (and eyacc UCB' extended Yacc IIRC)</span></font></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
<br>I have no expectation that it will displace C, but its developers have<br>
my admiration for pushing forward.  Maybe that's because, in maintaining<br>
a typesetting system that _isn't_ TeX, I recognize potentially kindred<span class="gmail_default" style="font-family:arial,helvetica,sans-serif"> </span>spirits.<br></blockquote><div><font color="#0000ff"><span class="gmail_default" style="font-family:arial,helvetica,sans-serif">I've used Free Pascal as a teaching tool for the last few years. They did a nice job.</span> </font></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
<br>Well, the professionals weren't wrong.  MS-DOS was a crap OS on a crap<br>
ISA.  They were both market placeholders.  But we don't work, or live,<br>
in a meritocracy.  As ever, the surest route to the head of the line is<br>
to be deposited there at birth by your ancestor.<br></blockquote><div><span class="gmail_default" style="font-family:arial,helvetica,sans-serif"><font color="#0000ff">Cole's Law:  "<i>Simple Economics always beats Sophisticated Design</i>"</font></span><font color="#0000ff"> </font></div><div><font color="#0000ff"><span class="gmail_default" style="">The PCs were cheap, and >>eventually<< people got them to do the things they needed.</span><span class="gmail_default" style="font-family:arial,helvetica,sans-serif"> </span></font><span style="font-family:arial,helvetica,sans-serif;color:rgb(0,0,255)">This is classic </span>Christenson<span style="font-family:arial,helvetica,sans-serif;color:rgb(0,0,255)"> 'Disruptive Technology." The "lessor" technology beat the "better"  one by creating a new market </span>with different<span style="font-family:arial,helvetica,sans-serif;color:rgb(0,0,255)"> set of </span>customer<span style="font-family:arial,helvetica,sans-serif;color:rgb(0,0,255)"> and can build faster and over time the features of the 'lessor' technology will catch up because </span>its<span style="font-family:arial,helvetica,sans-serif;color:rgb(0,0,255)"> on a faster growth curve.</span></div><div><font color="#0000ff"><br></font></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><br>
Oof, for RT-11.</blockquote><div><div class="gmail_default" style="font-family:arial,helvetica,sans-serif"><font color="#0000ff">OMSI Pascal ran on RT/RSX/RSTS and Unix. But they sold the most copies for RT  and RSX.</font></div><br></div><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">I've booted RSX-11--once--on my PiDP-11.  It was a<span class="gmail_default" style="font-family:arial,helvetica,sans-serif"> </span>jarring experience.</blockquote><div><div class="gmail_default" style="font-family:arial,helvetica,sans-serif"><font color="#0000ff">Yep.</font></div><br></div><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"> Booting 2.11BSD was headily nostalgic, and took me<br>
_way_ back.  I haven't seen a boot sequence like that in a long time.<br></blockquote><div class="gmail_default" style="font-family:arial,helvetica,sans-serif"><font color="#0000ff"> Did you try V5, V6  or  V7?</font></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><br>
<br>
I can't completely agree with you here because as I understand the<br>
critique, C still has _some_ of them _today_.  Often not as badly as in<br>
the past, and almost certainly not as bad as the Pascals of the day.<br></blockquote><div><font color="#0000ff"><span class="gmail_default" style="font-family:arial,helvetica,sans-serif">See Dennis' quotes from above.</span> </font></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
<br>I had thought that device-independent troff directly drove some changes<br>
to the C language (not just support libraries), but maybe I'm wrong.</blockquote><div><div class="gmail_default" style="font-family:arial,helvetica,sans-serif"><font color="#0000ff">It likely did. Steve may be able to  add color here.</font></div><br></div><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"> I<span class="gmail_default" style="font-family:arial,helvetica,sans-serif">  </span>have no idea how the Ritchie compiler or PCC evolved after Seventh<br>
Edition (1979). </blockquote><div><div class="gmail_default" style="font-family:arial,helvetica,sans-serif"><font color="#0000ff">PCC took the mantel, and eventually, PCC2  took  that -- look in SVR4 sources for  the latter.</font></div><br></div><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">The main thing I know about it is that if an<br>
implementation targeted x86, it added `near` and `far` keywords to<br>
accommodate segmented memory and/or DOS-style object file formats. </blockquote><div><div class="gmail_default" style="font-family:arial,helvetica,sans-serif"><font color="#0000ff">I think Lattice C did that first, and it was picked up by the DOS crew.  Most of us thought it was an abomination, but we had switched to 32-bits by then and Vaxen and 68000s.</font></div><br></div><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">Well, you _could_ bypass it and use read() and write() directly.  Say,<br>
in cat(1), the way Pike intended.  ;-)<br></blockquote><div><span class="gmail_default" style="font-family:arial,helvetica,sans-serif"><font color="#0000ff">And people did since that was the >>UNIX<< IO system, but it was not the Honeywell or MVS system (or ITS for the Synder PDP-10 compiler). As I said, please remember that systems programming languages were like assemblers; the local OS supplied  the I/O library.</font></span><font color="#0000ff"> </font></div><div><font color="#0000ff"><br></font></div><div><div class="gmail_default" style=""><font face="arial, helvetica, sans-serif"><font color="#0000ff">Lesk codified a scheme that could be made to work on multiple target OSes.  Dennis rethought and reimplemented a similar idea with fewer issues:</font> </font><font color="#38761d" style="" face="monospace">libS.a.  </font><font style="" face="arial, sans-serif" color="#0000ff">With the White Book,</font><font color="#38761d" style="" face="monospace"> libS.a</font><font face="arial, helvetica, sans-serif"> <font color="#0000ff">was formalized, and only then did C have an IO library. In fact, when Lattice did their first DOS compiler, they provided an IO scheme for DOS and only sort of kinda did Standard I/O.</font></font></div></div><div class="gmail_default" style=""><font face="arial, helvetica, sans-serif"><font color="#0000ff"><br></font></font></div><div class="gmail_default" style=""><font face="arial, helvetica, sans-serif"><font color="#0000ff">Best wishes.</font></font></div><div class="gmail_default" style=""><font face="arial, helvetica, sans-serif"><font color="#0000ff">Clem</font></font></div></div></div>