Not sure what all this pile of crap means.
This "pile of crap" is known as a C programming language. It often triggers an emotional reaction from people who fail to understand its concepts, and principles it is built upon. The latter are quite simple, so I attribute that lack of understanding to the lack of effort, aka laziness.
A lot of words, but I haven't seen any concrete argument that would actually make my few above points "false".
The "words" are actually contained in the language specification, known as C standard. Moreover, the amount of effort spend by language enthusiasts on explaining that peculiar matter of arrays and pointers in enormous. I don't see any reason to copy-paste all that here for umpteenth time.
My intent is to point out your errors. And I did that with my signature surgical precision. The subsequent research is left entirely to you. I can only give you direction.
Like, a pointer for array access 'an imaginary concept"?
It is something that exists only in the mind of "C abstract machine". It only exist in paper documents, in formal definitions of various language features that rely on implicit array-to-pointer conversion (e.g. `[]` operator).
It has no reason to exist in the semantics of an actual real-life C implementation. And it doesn't.
Do you actually know what a compiler emits for array access?
Oh, yes, very well.
How is that different from pointers (except for the few points I mentioned)?
Um... You are diverging into some unrelated area here. At the machine language level all accesses to memory are performed through "pointers". From that point of view every lvalue in C can be though of as "pointer". Every time you access a variable in memory, it will go through some sort of "pointer". So, from that point of view you can ask the same question ("How is that different from pointers") about the entire object model of C language.
Sorry, dear. The machine-level concepts and your "how is that different from pointers" have no bearing on the C language concepts. You are trying to mix two different C language concepts: a concept of
lvalue and a concept of
pointer. In C these are not the same.
And as I said, except for exotic compiler extensions, the compiled code for accessing an array is no different from doing this directly with a pointer.
That is false. The compiled code for accessing an immediate array will be
very different from the compiled code for accessing a pointed-to array through a pointer.
Moreover, compiled code for accessing an
immediate struct object is the same as compiled code for accessing an
immediate array. And compiled code for accessing a struct object
through a pointer is the same as compiled code for accessing an array
through a pointer.
Array objects are no different from struct objects. (Referring to commonly applicable operations, of course. You can't index-access a struct in C). Yet, you don't claim that struct are also "pointers", do you?
You can of course assign arrays to pointers for accessing them, and it makes no difference either.
It makes no difference cosmetically: the code looks the same. But it makes huge difference semantically and at the level of generated code. As I said above, accessing an immediate array and accessing an array through a pointer will generate completely different code.
The difference will become much more obvious when we start considering multi-dimensinal arrays. In fact, many people trapped in that misguided belief that "arrays are no different from pointers", get their first rude-awakening-style experience when they start working with multi-dimensinal arrays.
For example
int a[2][2] = { 0 };
int *const b[2] = { (int [2]) { 0 }, (int [2]) { 0 } };
a[0][0] = 42;
b[0][0] = 42;
In this little example above we have two different implementations of two-dimensional arrays `a` and `b`. One is a "classic" built-in 2D array. Another is a hand-made pointer-based "jagged" array. In other to build the latter we "assign arrays to pointers", as you said above. Yet, even though array access looks the same for both arrays (i.e. we just use `[k][m]` with both) this is purely a superficial similarity. The semantics of these two data structures are completely different and completely incompatible.
Or possibly you're being overly pedantic to the point of expressing worthless points that can only confuse people instead or helping them.
I'm a better judge of what helps people better in this matter.
To make things very clear, I'm strictly talking about C here. C++ is completely different.
When it comes to the matter of raw built-in arrays? No, C++ is not different at all, as long as we are talking about meaningfully comparable semantics.
In C++ you can even overload the [] operator, so that's a completely different territory.
No, you can't overload `[]` operator for a built-in type. So, I don't see why you are even mentioning it here. No need to bring C++ into the picture.
Arrays in C are just effectively allocated memory buffers, whether statically or on the stack.
All objects in C are just memory buffers (see my reference to structs above, for a specific example), with the exception of bit-fields. So, I don't see what point you are trying to make by this.
Yes, array `T [N]` in C is just a contiguous block of memory of size `N * sizeof(T)`. That's all. No pointers here.
Accessing an array in my world (maybe yours is in a different elevated sphere) means: accessing data within it. Which works exactly the same as with any other memory buffer.
I agree. And as I said above, accessing an immediate array is no different from accessing an immediate struct object. Yet, this is no reason to claim that struct objects are "just pointers".
Of course an array identifier can't be an l-value, just like a constant pointer. Just like functions.
Um... What??? This is patently false.
Arrays in C
are lvalues. Just like constant pointers
are lvalues
const int *a = 0; /* `a` is an lvalue */
int b[100]; /* `b` is an lvalue */
It is possible to create a non-lvalue array in C, but that would require some deliberate jumping through some hoops.
So, what are you talking about?
(Functions in C are not lvalues though - you got that right)