C'mon, guys! (Really, pointer pedagogy)

Peter S. Shenkin peters at cubsvax.UUCP
Fri Jun 20 04:53:14 AEST 1986


In article <bu-cs.811> bzs at bu-cs.UUCP (Barry Shein) writes:
>
>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.

Just a quick remark.  When I was learning C, I understood that "*pi" meant "the
contents of pi," but somehow had difficulty conceptualizing why the declaration
"int *pi;" declares pi as a pointer to an int;  that is, I knew it was a
convention I had to memorize, but it didn't seem mnemonic to me.  Then, about
a month ago, revelation!:  read this as "the contents of pi is an integer;"
which implies, "pi is that which contains (or points to)" an integer.  Somehow 
it made thinking about the declarations easier.  It's occurred to me that maybe
everyone else in the world sees this from day 1, but for us dumb folks, having
this reading pointed out would probably make the learning process easier....

Peter S. Shenkin	 Columbia Univ. Biology Dept., NY, NY  10027
{philabs,rna}!cubsvax!peters		cubsvax!peters at columbia.ARPA



More information about the Comp.unix mailing list