3 ms·
In response to point #3, my counter-example is that when you list a method's arguments or return type, the parentheses include the star. In other words, the sta
by archagon 13y ago
In response to point #3, my counter-example is that when you list a method's arguments or return type, the parentheses include the star. In other words, the star does not "belong" to the variable in that particular case.
-(NSData*) myMethod:(NSString*)string;
It can really be argued both ways. We've hugged the type everywhere I worked.
- greatsuccess 13y agoI agreed with you for about ten years, and then I stopped doing that because of the OPs example but also because idiomatic c and c++ are written this way and I just decided to stop swimming upstream after reading enough of it. But it can be very confusing when dealing with dereferences. So I feel you there. Doing C for 15 years you just get used to it.
- informatimago 13y agoThe OPs example only shows that you should never declare two variables on the same line! This is a rule that's as old as programming, even. int* a; int b;