Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!watmath!clyde!burl!ulysses!allegra!mit-eddie!genrad!panda!enmasse!rclex!harvard!bu-cs!bzs From: bzs@bu-cs.UUCP (Barry Shein) Newsgroups: net.lang.c,net.micro.pc,net.unix Subject: Re: C'mon, guys! Message-ID: <811@bu-cs.UUCP> Date: Wed, 18-Jun-86 10:34:49 EDT Article-I.D.: bu-cs.811 Posted: Wed Jun 18 10:34:49 1986 Date-Received: Fri, 20-Jun-86 01:24:21 EDT Organization: Boston Univ Comp. Sci. Lines: 48 Xref: watmath net.lang.c:9455 net.micro.pc:8724 net.unix:8225 Guy Harris writes: >...sometimes I think pointers should be *subtracted* from C, since people seem >to get very confused about them... >...OK, maybe they're useful, and shouldn't be removed. C classes should spend >*lots* more time on them than they are doing, though, given these problems; >better that people learn in class before they start writing code Being as I teach a couple of C courses a year here at BU I thought I would comment on this, perhaps it would be of some use to language designers (or make them give up entirely!) It's not 'C', I've had the same basic problems with students when teaching IBM assembler, PL/I and Pascal. There seems to be some fundamental problem with distinguishing "the thing" from "the thing contained"*. In english (and probably most other natural languages) we interchange these notions very loosely as in "The White House said today..." or "she packed a great lunch" (it's a little subtle, think about it, "I called 411" is a similar conceptual variant.) Somewhere in that mess they have to retrain themselves to carefully distinguish between these two notions and not confuse a 'box' with it's 'contents', an address with a value contained therein, to remember two things for one object. It's similar to the exasperating problem of teaching recursion (another concept we are taught in language is actually an *error*, "don't define things in terms of themselves!") That is, it's more fundamental then simple language design although design can affect the learning process. I believe C is actually superior to, say, Pascal in this regard as Pascal never removes the mystery from pointers (one exercise I will give a student having conceptual problems is to printf some pointers in a meaningful way as the program runs, such as when stepping through an array with a pointer, try that in Pascal, you'll probably get a compile-time error from the write() statement.) Practice helps *IF* they can get past the first conceptual hurdles, many never do. But then again, those that don't aren't writing to net.lang.c, they're all in Law School... -Barry Shein, Boston University * An amusing anecdote I've heard attributed to Marvin Minsky (who knows) involves him saying angrily "YOU'RE CONFUSING THE 'THING' WITH 'ITSELF'!".