Well said.
Love4Boobies wrote:Pointer declarations ( int * a ) vs. dereferencing "( *a ) is a bad idea. The declaration syntax mimics expressions on purpose, I thought we were running away from edge cases. Next thing you know, we're either going to have to do stuff like ! b or char a [MAX]; --- I say we revert this.
There is the age-long discussion on
int* b (grouping the type, avoiding errors in multiple pointer declarations in a comma-separated declaration list) vs.
int *b (declaraction mimics use). I always felt that
int * b was deflating
that particular argument nicely... are you sure about that revert? You'll get
right back into the discussion with any
int* b advocates around?!?
I can understand the concern regarding the lack of nested comments in C, but this is a wiki; the restriction is kind of silly since we're not going to temporarily turn code off on the wiki.
I admit that's an artifact of
my "general project style" leaking into the Wiki guide. I feel that
/* */ is just
asking for trouble, and should best be avoided
altogether... I removed the two lines advocating
// only, but left the example comments in that form - that's better?
I'm still pretending that treating sizeof differently than other operators is not an edge case
The equivalent for addition, according to the current guide should be
( a ) + ( b ).
Well...
sizeof isn't exactly "just like the other operators" to begin with. Unless, of course, you're using
and or
or.