[TUHS] Why Pascal is Not My Favorite Programming Language - Unearthed!

Bakul Shah bakul at bitblocks.com
Thu Aug 31 11:13:39 AEST 2017


On Wed, 30 Aug 2017 06:34:54 MDT arnold at 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



More information about the TUHS mailing list