chronic source of confusion in C

Chris Torek chris at mimsy.umd.edu
Fri Feb 16 01:38:41 AEST 1990


In article <1486 at mdbs.UUCP> zed at mdbs.UUCP (Bill Smith) writes:
>Why is the ANSI definition of arrays such a chronic source of
>confusion?  Was it screwed up so bad before that it will take
>a lot of work to re-train the masses?
>
>Is the current definition more sophisisticated than the old
>intuitive (?) version?  Are the people who teach C unaware of
>the subtleties of what an array is?

The `current' definition (by which I presume you mean the ANSI C
definition) of arrays is, for all intents and purposes, identical to
the K&R-1 definition.  The only change was the addition of a notion
of `incomplete' types, and that an array with unknown size is an
incomplete type.

As for the lattermost question: I suspect that yes, many people who
teach C do not understand how C arrays work---that is, do not understand
that C arrays are, at best, second class citizens; that there are no
array values, only array objects.
-- 
In-Real-Life: Chris Torek, Univ of MD Comp Sci Dept (+1 301 454 7163)
Domain:	chris at cs.umd.edu	Path:	uunet!mimsy!chris



More information about the Comp.lang.c mailing list