Hacker News new | ask | show | jobs
by jejones3141 1194 days ago
The intent, as I understand it, is that "declaration should look like use", so that the base type is on the left. If you declare int *foo; then *foo is an int.

IMHO the existence of "cdecl" is evidence that it might not have been the right choice.

1 comments

Declaration should look like use is nonsense though. I mean, what is the practical benefit of putting the pointer to the left of the name instead right to the type? For pointers the difference is literally just on which side of the space the asterisk sits at the expensive of making it unreasonably difficult to represent nesting of type constructs.