cro…@spitfire.i.gajendra.net (Dan Cross) writes: [...]
> To be provocative, I think it is easier to conceptualize if one > thinks of C as lacking first-class array types. Rather, C has > pointers to contiguous regions of memory of some size; the > array-like notation is just syntactic sugar around this.
This could lead to a lengthy discussion about what "first-class" means. I'm not sure I want to participate in it. My point of view is that C very definitely has array types, array objects, array expressions, even array values. (A "value" is the "precise meaning of the contents of an object when interpreted as having a specific type". An array value consists of the values of its elements.) It just restricts certain operations on array types/objects/expressions/values. My preference is to think about C as it's currently defined. It's certainly important to understand where C's quirks came from, but dmr and WG14 went to a great deal of effort to define C in its own internally consistent terms. Understanding B certainly helps, but it shouldn't be *necessary*.
> Btw, in the Q&A transcript at the above link, Ritchie says this > when asked about C declaration syntax: > > |It was Ravi Sethi who observed that if C's unary star operator > |were a postfix operator instead of a prefix operator, suddenly > |everything becomes nice and linear and clear. > > (Now excuse me, I am ducking and running for cover....)
Ah, what might have been.
-- Keith Thompson (The_Other_Keith) Keit…@gmail.com void Void(void) { Void(); } /* The recursive call of the void */