Without reliving the Pascal/C war of the day, I have to admit that I too loved Brian’s piece when we wrote it and love it still.   But you have to understand the context.   




>>  If Unix was written in Pascal I would've happily continued using Pascal!

>Amusing in the context of Brian's piece, which essentially says if Unix
>could have been written in Pascal, then Pascal wouldn't have been Pascal.

Doug amen.


There really are a few pieces of information that I think are lost from history.    Pascal was and is still as difficult to match as a teaching language.   Brian says exactly that in is piece – it is like a ‘Piper Cub.’   I still use it for just that when I teach scouts, nieces, nephews or anyone else that asks me, where to start.  Today’s "Free Pascal" system is pretty hard to beat - runs on anything and "just works."

 

When BWK wrote that paper, other than MIT stubbornly hanging on to LISP, all the major CS departments used Pascal as the language that they taught freshman CS courses.   Cooper and Clancy’s “Oh Pascal” was pretty much de rigor as the text (I still have a couple of editions from when I taught with it).  I fear that many (?most?) of the traditional language types hated C as ‘dirty’ if not ‘almost industrial.’   No one but an “OS-weenie” would use it.

 

But the problem was that in those days, because Wirth had designed it for complete small student programs, it was hard to write large real programs (as Brian points).  So people fixed it and every fixed it differently.  Pascal was hardly standardized.   So it ended up being a terrible production language.   In 1979, one weekend a couple of us at one of the famous Tektronix/HP - McCoy/Hatfield parties that Steve Glaser hosted in Oregon, a couple of us (TW Cook from HP, Steinhart from Tek, myself, etc.) got into a contest to see if there were more incompatible flavors of Tek Pascal than there were of HP Basic (I remember, we counted over 10 Tek Pascals and 14 HP Basics when stopped).

 

And this was the root of the real problem.


You could not write “real” programs in it and really make them run on actual systems.   Brian was writing that paper, after an exercise in exactly that task – rewriting the Software Tools into Pascal.   That paper was his lessons learned.

 

BTW:  I’ve always thought part of the reason C++ and Java got the jump they did, was because the language type could say “C didn’t win.”   But I do find it interesting that they now use Python as a teaching language, which I think is almost ‘dirtier’ than C ever was.


On Thu, Aug 31, 2017 at 1:51 PM, Larry McVoy <lm@mcvoy.com> wrote:
+1 on everything he said.  Especially the bug chasing.  As a leader,
a lot of what I've done has been to push back on "clever".

On Thu, Aug 31, 2017 at 10:12:43AM -0600, Warner Losh wrote:
> I did a lot of Pascal programming back in the day on my DEC Rainbow with
> Turbo Pascal. Also wrote a compiler for an 'extended subset' of the
> language in my CS compiler's class, which was fun. But by then I'd
> transitioned to C (once Turbo C was available for the IBM-PC, I hacked
> together a TSR so I could run it on the not-too-compatible Rainbow). I
> liked the low level access, but honestly, when I was a kid programming, I
> liked that { was 4 characters shorter than BEGIN and } was 2 shorter than
> END more than anything else...  Also, the generally mono-case of C (at the
> time, this was before I discovered X11's bletcherous CamelCaseStyle) was
> easier on the eyes....  But these days I'm more mellow about this stuff
> since I know that the time to type in the code is tiny compared to the time
> spent chasing down a bug because ++*++foo--; didn't work like you'd
> expected making all the cleverness that went into it wasted...
>
> Warner
>
> On Thu, Aug 31, 2017 at 9:26 AM, Eric Wayte <ewayte@gmail.com> wrote:
>
> > In the mid 80's when I took Programming II as part of my CS degree, I used
> > every Pascal compiler I could get my hands on:  Waterloo Pascal on VM/CMS
> > (mainframe), Turbo Pascal, UCSC p-System on an Apple II, and Kyan Pascal on
> > my Atari 800XL.
> >
> > Fun times!
> >
> > On Thu, Aug 31, 2017 at 10:48 AM, Larry McVoy <lm@mcvoy.com> wrote:
> >
> >> I did a lot of programming in Turbo Pascal (because it was so fast
> >> to compile) and I liked the language OK.
> >>
> >> I was taught data structures in Pascal and later taught using Pascal
> >> and it was a fine teaching language.  I agree with the comment that
> >> it is easier to use right, more guard rails.
> >>
> >> But as you grow up, you want to take off the guard rails once in a
> >> while and Pascal didn't let you do that.  C does that routinely,
> >> which one could argue isn't that great, but it sure is handy.
> >>
> >> On Wed, Aug 30, 2017 at 06:13:39PM -0700, Bakul Shah wrote:
> >> > On Wed, 30 Aug 2017 06:34:54 MDT arnold@skeeve.com wrote:
> >> > > Brian Kernighan was kind enough to find for me everyone's favorite
> >> > > Computing Sceince Technical Report, CSTR 100, "Why Pascal is Not
> >> > > My Favorite Programming Language".
> >> >
> >> > If I may comment on the paper itself....
> >> >
> >> > I used Pascal heavily for about 5-6 years and was also
> >> > involved in implementing a variant of Pascal for a couple of
> >> > years.  And I have used C since 1981.  I have to say I was
> >> > quite happy using Pascal. Some of bwk's criticism (e.g.  re:
> >> > sets) applies to pascal compilers, not the language. There is
> >> > also some misunderstanding (e.g.
> >> >     type apple = integer; orange = integer;
> >> > This is renaming, not a new type).  The array problem got
> >> > fixed somewhat in the 1985 standard, while arrays are not
> >> > even first class objects in C.  Most implementations added
> >> > separate compilation as well (1985 standard considers this an
> >> > implementation issue but does allow you to declare external
> >> > references).
> >> >
> >> > Things I missed in C that were in Pascal:
> >> > - enumerated types (type color = (red, blue, green))
> >> > - subranges
> >> > - nested functions (even if limited)
> >> > - first class arrays (even if limited)
> >> > - sets
> >> > - lexical non-local goto
> >> > - bounds checking
> >> > - arrays that didn't start at 0.
> >> > - function argument checking (K&R C)
> >> > - tagged variant records
> >> >
> >> > All in all, both languages are quite comparable.  Each
> >> > language had their strong points and weak ones. Basically Pascal
> >> > was easier to use /right/ and C more flexible. Pascal code is
> >> > easier to read than C code (even today). It was harder to
> >> > "cheat" in Pascal but the same is a useful feature of C for
> >> > low level work.  To be frank the *main* thing that attracted
> >> > me to C was its conciseness :-) If Unix was written in Pascal
> >> > I would've happily continued using Pascal!
> >> >
> >> > --bakul
> >>
> >> --
> >> ---
> >> Larry McVoy                  lm at mcvoy.com
> >> http://www.mcvoy.com/lm
> >>
> >
> >
> >
> > --
> > Eric Wayte
> >

--
---
Larry McVoy                  lm at mcvoy.com             http://www.mcvoy.com/lm