Can Novices Jump Directly in C? (Books)

Dave P. Schaumann dave at cs.arizona.edu
Fri Feb 15 07:52:39 AEST 1991


In article <431 at bria> uunet!bria!mike writes:
>[...]  The
>reason why is because so many other langauges go through great contortions
>to "insulate" you from the reality of memory and addresses.  Feel free
>to flame on, but IMHO programmers program _machines_.  Anything that
>goes to great lengths to insulate you from the machine is deprivation.
>It's just a matter of how much deprivation is useful, and how much is not.

The whole purpose of programming languages is to abstract the details of
implementation as much as possible.  In any new programming language, three
interlocked issues have to be addressed: safety, speed, and expressability.

For instance, you can make Pascal more expressable by including an address-of
operator (like C's &), but only at the cost of speed.  Similarly, C can be made
more safe but less expressive by removing the & operator. Index checking yeilds
a safety/speed trade-off, and recursion yeilds a speed/expressability
trade-off.

I would submit that for any language, if you want one of these to be high, you
have to sacrifice one or both of the others.  Now, to what extent depends on
a complex interaction of the current state of compiler theory, available
machines, and the skill of the implementor.

As we can see, various available languages provide a different compromise of
these three parameters: C has speed and expressability at the expense of
safety, while Pascal chooses safety, and to a lesser extend speed, at the
expense of expressability.  BASIC chooses safety way above the others.

Thus, we can see that the abstraction mechanism provided by modern programming
languages is a trade off of safety for expressability and safety.  The notion
that we program machines, IMHO, is wrong.  We program algorithms.  At it's
highest level, no algorithm deals with memory, or addresses, or anything so
concrete.  At this level, programming is utterly abstract.

Now for the average programmer, language choice is merely a matter of "what do
I know/what is available?".  For a serious programmer/computer scientist,
language choice is a matter of "what fits the problem".

>Michael Stefanik                       | Opinions stated are not even my own.
>Systems Engineer, Briareus Corporation | UUCP: ...!uunet!bria!mike
-- 
Dave Schaumann      | DANGER: Access holes may tear easily.  Use of the access
		    | holes for lifting or carrying may result in damage to the
dave at cs.arizona.edu | carton and subsequent injury to the user.



More information about the Comp.lang.c mailing list