No, they are perfectly well placed in my mental model; they are notations for totally different things. int* x is "int-pointer x" and int (*x)() is "magic rune".
Don't you object to the 'int' being the type in the former case and the return type in the latter? Don't you object that it isn't int function(...) *x?
No. My mental model of C is that declaration matches use. This has the advantage that it is always correct, because it's the model the language uses, and doesn't need to resort to lameness like "magic rune".
Funny that, my mental model is to just have well defined areas of ignorance coupled with knowledge of where to find answers. This tends to leave more room for useful things. Bit like a cache :).
Which is superior depends on how often one runs up against the areas of ignorance I suspect. This rarely happens in any of my code. Of course we could get into a slanging match or realise that, like many religious wars, each side has the solution that is right for them.
Geeks generally have this sadly mistaken notion that there is always a global optimum which applies to everyone rather than a succession of local maxima which suffice for the people which are standing on that particular hill :).
(no subject)
Date: 2006-04-11 10:03 am (UTC)Don't you object to the 'int' being the type in the former case and the return type in the latter? Don't you object that it isn't int function(...) *x?
(no subject)
Date: 2006-04-11 10:07 am (UTC)(no subject)
Date: 2006-04-11 10:13 am (UTC)Which is superior depends on how often one runs up against the areas of ignorance I suspect. This rarely happens in any of my code. Of course we could get into a slanging match or realise that, like many religious wars, each side has the solution that is right for them.
Geeks generally have this sadly mistaken notion that there is always a global optimum which applies to everyone rather than a succession of local maxima which suffice for the people which are standing on that particular hill :).
(no subject)
Date: 2006-04-11 11:30 am (UTC)void (*signal(int, void (*)(int)))(int);