[comp.lang.c] Comparing Pascal & C

dg@wrs.UUCP (David Goodenough) (07/14/87)

In article <1232@ius2.cs.cmu.edu> edw@ius2.cs.cmu.edu (Eddie Wyatt) writes:
>In article <228@amanue.UUCP>, jr@amanue.UUCP (Jim Rosenberg) writes:
>> > 	c = getchar();
>> > 	while (c != EOF)
>> > 	    {
>> > 	    .
>> > 	    .
>> > 	    c = getchar();
>> > 	    }
>> > 
>> 
>> I don't mean to flame you, but as it happens I believe your solution is
>> dead wrong, on two counts.  (1) The two loops are *NOT EQUIVALENT*!  They
>> may be equivalent to Pascal programmers, but they certainly are not to C
>> programmers. ......

Can we please ease up on this discussion - we all have our opinions, and
to quote Hal Hickman from the fortune database "Opinions are like assholes -
everyone's got one, but nobody wants to look at the other guy's." Trying
to compare C and Pascal is a bit like trying to compare a Ferrari 308 to
a Renault Le Car - they aren't quite the same. For one thing Pascal was
originally written, not as a programming language, but as a teaching aid,
and as such it does a first class job (no break / continue / no implicit
declarations of int functions etc.) However it is sadly lacking in several
areas - The very strict type casting becomes a bind after a while (witness
chr() and ord() for converting chars to ints), but it's biggest drawback
to me is the total lack of an address of operator. It's got pointers, but
what use are they if you can't point them at anything. So leave Pascal for
first year undergrads learning to program, and do the serious work in C.
I for one intend to go right on using the language's capabilities for
things such as:

	while ((ch = getchar()) != EOF)
	 {
		.
		.
		.
	 }

	with ch being an int .....
--
		dg@wrs.UUCP - David Goodenough

					+---+
					| +-+-+
					+-+-+ |
					  +---+