Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!asuvax!ncar!noao!arizona!dave From: dave@cs.arizona.edu (Dave P. Schaumann) Newsgroups: comp.lang.c Subject: Re: Can Novices Jump Directly in C? (Books) Message-ID: <860@caslon.cs.arizona.edu> Date: 14 Feb 91 20:52:39 GMT References: <1991Feb6.121722.1@hulaw1.harvard.edu> <39182@cup.portal.com> <15885.27b91b31@levels.sait.edu.au> <431@bria> Organization: U of Arizona CS Dept, Tucson Lines: 44 In article <431@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@cs.arizona.edu | carton and subsequent injury to the user.