From: bonney@esds.mdc.com (Greg Bonney)
Subject: Pascal and C
Organization: Visual Simulation Systems
Distribution: usa
Date: Wed, 22 Jul 1992 15:22:18 GMT


Mike Kienenberger SXMLK@ALASKA, SXMLK@acad3.alaska.edu writes:
>In article <1992Jul20.203317.10143@esds.mdc.com>, you write...
>>I still like Pascal.  Everybody says, "it was originally intended only to teach
>>people how to program".  And I say, "so what?"  C apparently wasn't "good
>>enough" in it's original incarnation either.  Otherwise, why did they have to
>>come up with ANSI C and C++?  And C does sacrifice readability in favor of
>>flexibility.  The C "for" statement is especially weird; it's completely
>>different from "for" statements I've seen in any other language.
>
>Sorry, I couldn't stand to leave you wallowing in your ignorance :-)
>ANSI C was created to make C "portable."  It really adds nothing to the
>language (and most of us C programmers still don't use the only thing it
>did add -- Pascal-like function declarations.)

First you say it "adds nothing", then in the same breath you say it adds
"Pascal-like function declarations"!  Is this the only thing about Pascal that
is better than K&R C?

Actually, there are other changes and additions.  K&R C recognizes only unsigned
int, whereas ANSI C recognizes unsigned short, and unsigned long also.  Under
K&R C, float is promoted to double when used in an expression.  ANSI C also
permits automatic arrays to be initialized.

(Just because my opinion happens to be a little different than yours doesn't
mean I'm ignorant.)

>C++ is an entirely different language.

Entirely?  I think not.  Any ANSI C program will still work in C++.  C++ only
adds features, it doesn't take any away.  If you want to call it a different
language, that's fine with me.  I, however, don't happen to agree with that
view.

>Just like Pascal++ will be if it's ever written.
>
>And while C may sacrifice readability in favor of flexibility, that flexibility
>is so powerful that we can live with the sacrifice :-)

That's okay with me.  Other people may not want to, though.  In the meantime,
we can only hope that somebody will invent a language that has the bennefits
of both C/C++ and Pascal.

>
>I wrote my first commercial product in Pascal (Turbo Pascal, if I remember
>right), but you couldn't drag me back nowdays.

I'm sorry, but I'm not impressed by the fact that you've actually written
commercial software.

>
>However, if you like Pascal, you might want to check out Ada.
>Strong typing for all you "long typing" folks.

I have checked out Ada.  I personally think it tries to do too much.

As far as "long typing" goes, if you have to write extensive comments
for code to be easily understandable, are you really saving on typing?
Of course, that depends on who's going to be reading your code.  If you
have a SQA group where you work, then you've got people reading your code
who don't program every day.  If other people have to maintain the code
you've written, you can't always assume that they're all experienced C
programmers either.  And I would maintain that it's pretty easy to write
C code that even an experienced C programmer would have trouble decifering.

>
>And, yes, the for loop does seem a little strange.

Boy, you really finished that argument off with a bang!

By the way, I like C.  But I like Pascal too.  Each has it's pros and cons.
Newsgroups: rec.games.programmer