Address of array

KW Heuer kwh at bentley.UUCP
Tue Mar 11 12:56:33 AEST 1986


In article <211 at dg_rtp.UUCP> dg_rtp!throopw (Wayne Throop) writes:
>I agree that C's treatment of array/function/struct addresses is
>inconsistant, confusing, and limiting.  In essence a small notational
>convenience was traded for a large consistancy headache.  I think the
>tradeoff was wrong ...

Yeah, arrays are really second-class citizens in C.  I think it would have
been possible to make the array a "real" datatype, with [] an array (rather
than pointer) operator; I'd be quite willing to write &a[0] in lieu of the
automatic array-to-pointer conversion.  Of course it's too late to change
things in C; too many programs depend on it.  And C++ is committed to C
compatibility.  Are there any plans for a "D" language?

I already posted my comments on function addresses, so I won't discuss them
here.  Why do you include struct addresses in your complaint?  I don't see
anything inconsistent, confusing, or limited in them, at least nothing
analagous to function and array addresses.

Karl W. Z. Heuer (ihnp4!bentley!kwh), The Walking Lint.



More information about the Comp.lang.c mailing list