For a long time, a C # / java / C ++ programmer, the spankin brand, new for objectification C. Read the recommendations, looked at the api, but not quite there by naming convention.
Example: suppose I have a Cars class that has an array of each car, and you want the methods to return a subset of the array.
I see that NSArray has a getObjects method, but in most cases I don't see "get". So what do you prefer?
All inputs are appreciated! Too much time spent thinking about it.
Option A) - (NSArray *) getCarsWithColor: (NSString *) color;
Option B) - (NSArray *) getCars: (NSString *) withColor;
Optoin C) - (NSArray *) carsWithColor: (NSString *) color;
OPTION D) - (NSArray *) cars: (NSString *) withColor;
Option E) none of the above, do not name it xxxxxxxxxxxx ....
Thanks.
source share