http://www.student.cs.uwaterloo.ca/~cs137/current/res/intstarp.shtml
I have a preference towards int* p. This is because (int*) is a type: an
integer pointer, with a variable named p. On the other hand, "int *p"
reads "type: integer", with a pointer to a variable: p. Here int* is a
type, the type isn't just int. Same as if you had (char* c), which would
be a pointer to a character, not (char *c): a pure character type.
</devil's advocate>
Let me try to understand your argument.
So you said, because the type of p is an integer pointer, we should
naturally group the type name (int*) as a single entity. A declaration
like (int *p) groups the variable name and part of the type name
together, which looks weird. Am I understanding you correctly?
Then, Rob, let me ask you this. What is the type of the foo:
int *(*(*foo[4])(int x, int y))[5];
The type of foo is (int *(*(*[4])(int,int))[5]) (an array of pointers to
functions that takes 2 integer parameters, and returns a pointer to an
array of pointers to integers), but notice that you don't just say
int *(*(*[4])(int,int))[5] foo; //syntax error
You DON'T put the variable name at the end (like you do when you say
int* p), you put it in the MIDDLE, around the stars and brackets. This
is how variables are declared in C. This is how the compiler read them.
(int *p) is consistent with this idea.
What do you have to say to that, Rob? :)