Github user cjpearson commented on the pull request:

    https://github.com/apache/cordova-ios/pull/145#issuecomment-115654625
  
    The current style is not incorrect or a bad habit. It may not follow 
Apple's style, but both styles are valid and readable.
    
    Many C programmers choose to attach the asterisk to the variable, 
emphasizing syntax, while most C++ programmers prefer to emphasize the type by 
attaching the asterisk to the type.
    
    Since Objective-C, like C++, is an Object Oriented language, I think it 
makes much more sense to emphasize type by keeping the asterisk attached to the 
type.
    
    Also, there are several common situations in Objective-C where there is no 
variable for you to attach the asterisk to even if you wanted.
    
    Casting
    
    `(NSString*)someObject`
    
    Method Parameters
    
    `- (void)someMethod:(NSObject*)param;`
    
    Generics
    
    `NSArray<NSString*>* someArray;`
    
    The common defense against grouping the asterisk with the type is that one 
might think these two lines behave the same.
        
        int* a, b, c;
        int *a, *b, *c;
    
    I think that's a pretty easy situation to avoid. Just declare your 
variables on different lines.
    
    For whatever it's worth, I vote keeping the style the way it is.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscr...@cordova.apache.org
For additional commands, e-mail: dev-h...@cordova.apache.org

Reply via email to