gwyn@smoke.BRL.MIL (Doug Gwyn ) (03/06/89)
In article <11950@haddock.ima.isc.com> karl@haddock.ima.isc.com (Karl Heuer) writes: >I didn't say that X3J11 could have made arrays first-class citizens; I said >it could have added array copy (thus raising arrays from third-class citizens >to second-class, as was done with structs). People concerned with this issue should perhaps be made aware that there is (so far unofficial) work being done on ways to fully support arrays and vector operations in C. In particular, Tom MacDonald of Cray has come up with prototype specifications for syntax and semantics for true array objects and "array sections". The notation is separate from that for existing C second-(or third-)class array objects, so it is a compatible language extension. Presumably the vendors who care (such as supercomputer manufacturers) will be working with such extensions; once sufficient practical experience has been acquired, it might make sense to add some such extension in a future revision of the C language. My personal point of view is that pointers are fundamental to C, and arrays are only necessary in order that pointer arithmetic be useful. Therefore I can easily live with arrays essentially as they are, although I understand why vector-architecture vendors want language constructs that map directly onto their architectural features. There are any number of data-structure operations that would be nice to have built into the language, but the "spirit of C" demands that only the basic ones be built in and that others be efficienty constructable from them.