Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!watmath!clyde!burl!ulysses!allegra!mit-eddie!genrad!panda!talcott!harvard!cmcl2!seismo!brl-adm!brl-smoke!smoke!gwyn@BRL.ARPA From: gwyn@BRL.ARPA (VLD/VMB) Newsgroups: net.lang.c Subject: Re: A last word on arrays? Hah! (LONG) Message-ID: <132@brl-smoke.ARPA> Date: Sat, 19-Apr-86 03:06:10 EST Article-I.D.: brl-smok.132 Posted: Sat Apr 19 03:06:10 1986 Date-Received: Mon, 21-Apr-86 07:38:02 EST Sender: news@brl-smoke.ARPA Lines: 42 jmp_buf jb; setjmp( jb ); Ok, how do you propose to implement setjmp()? Allowing array names as lvalues might be worthwhile, but trying to totally redefine C array behavior at this point comes under the category of invention, not standardization. Contrary to your statements, it is currently correct to state that in C, with the minor exception of the operand of sizeof, the NAME of an array object in an expression is equivalent to a pointer to the first element of the array. This holds for multidimensional arrays too, which is why foo[i] means what it does for foo declared "type foo[M][N]". C arrays are certainly not defined as cleanly as most other elements of the language, but cleaning them up will break current code. The reason sizeof array-object is an exception is that sizeof means "number of bytes of storage associated with the data object", and if the exception had not been made, there would be no reasonable way to say "storage occupied by an entire array". I was pretty angry when I found the UTX-32 C compiler claiming that sizeof "xyzzy" was 4 since that's how big a (char *) is.. Functions are similar in some respects to arrays in that they have similar name-usage restrictions. Real problems in C need to be fixed, but the fact that different types of data have different properties should not be too upsetting; what would be the point of different data types otherwise? Let's get the language standardized as it now stands and worry about turning it into C++ later.