Re[2]: Learning C Programming

Subject: Re[2]: Learning C Programming
From: "Walker, Arlen P" <Arlen -dot- P -dot- Walker -at- JCI -dot- COM>
Date: Mon, 7 Dec 1998 11:07:49 -0600

> The basic difference between Pascal and C is that C makes the
assumption
> that you know what you're doing, while Pascal assumes you're
completely
> ignorant.

This is also incorrect, but it's a common prejudice among C
programmers.

Having written in both languages, I'll stand by the statement as written.
The Pascal compiler makes assumptions about what you *really* want to do,
while the basic assumption C compilers make is that you know what you're
doing. Hence trying to do something useful in Pascal often takes more
effort than in C, because you have to work around the (all too often
incorrect) assumptions Pascal makes.

Pascal has been used for some extremely sophisticated applications.
For example, most of operating system of the Macintosh and much of
Windows was originally written in Pascal.

The operative phrase in that is "has been." I can't answer for Windows, but
in the Mac's case, they had a special dialect of Pascal that they paid
Nicolas Wirth to develop for them, known today as Object Pascal, because
they needed that capability to manipulate the Lisa's GUI (and the Mac OS
was originally developed on the Lisa, a machine not known for the plethora
of development tools available for it). I doubt seriously much of Windows
was ever done in Pacal (though I don't have any direct knowledge). It's
true the Windows function calls use the Pascal calling convention, but
that's often done in pure C programs when you want routines to be callable
from many different languages, and in the specific MS case, it wouldn't at
all surprise me if the Windows calling convention was Pascal simply because
the Mac calling convention was Pascal. Today, the Mac OS is almost entirely
done in C/C++. Apple's devloper toolkit (MPW) no longer even provides a
Pascal compiler. Symantec also discontinued its Mac Pascal compiler a year
ago. For that matter, a search of the MS website fails to turn up a Pascal
compiler, either (due to the fact that the MS website is ill-designed and
ill-managed, however, I would hesitate to deduce from this that they don't
make one, but it still counts as a strong indication that they don't).

A lot of commercial software for both Windows
and Mac has been and continues to be written in Pascal.

I have strong doubts about that. I know of a couple (Chess Assistant, I
think, uses Pascal, because of a dependence upon Delphi, and Bookup also
was done in it) but "a lot of" is, I think, an overstatement.

In any case, it's not an either-or situation. Learning one doesn't
preclude you from learning the other.

Neither would learning Cobol, Modula-2, SmallTalk, or Eiffel, but that
isn't the question. If the purpose was to get a start in the programming
field, I might not have given the same answer to the question. But the
original question was "what was the best way to learn C?" It struck me (and
still does) that recommending Pascal in that context is like recommending
that anyone who wants to learn French start out by learning Latin, and only
then learn French.

I am a C/C++ programmer, by the way. I've probably written 1000 lines
of code in C or C++ for every one I've ever written in Pascal.
Precisely because I've written so much C/C++, I have no illusions
about it.

And it's precisely because I've written so much Pascal that I harbor no
illusions about *it*, either. It has its uses as a teaching tool for CS
majors, and if this were a programming list it might be germane to get into
a discussion about just what those uses might be. But I don't think it's a
requirement for the original poster's goal, nor a requirement for any
writer who's simply trying to converse intelligently with the development
staff.


Have fun,
Arlen
Chief Managing Director In Charge, Department of Redundancy Department
DNRC 224

Arlen -dot- P -dot- Walker -at- JCI -dot- Com
----------------------------------------------
In God we trust; all others must provide data.
----------------------------------------------
Opinions expressed are mine and mine alone.
If JCI had an opinion on this, they'd hire someone else to deliver it.

From ??? -at- ??? Sun Jan 00 00:00:00 0000=




Previous by Author: Re: Alternative to Front Page?
Next by Author: Re: HTML & CSS
Previous by Thread: Re: Learning C Programming
Next by Thread: Re: Learning C Programming


What this post helpful? Share it with friends and colleagues:


Sponsored Ads