Why was C++ designed such that the correct way to declare two int *s on the same line is
int *x, *y;
not
int* x,y;
I know some people think you should avoid either form and declare every variable on its own line, but I’m interested in why this language decision was made.
To keep compatibility with C code, because that’s how C works.
Bjarne makes a good point in his style and technique faq:
So, the motivation for this working as this in C++ is how it works in C.
The motivation it works like that in C is that, as stated above, C emphasizes expressions rather than types.