[TUHS] Why Pascal is Not My Favorite Programming Language - Unearthed!
lm at mcvoy.com
Fri Sep 1 00:48:52 AEST 2017
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 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
> 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!
Larry McVoy lm at mcvoy.com http://www.mcvoy.com/lm
More information about the TUHS