[Biococoa-dev] Method names with 'and'

Charles PARNOT charles.parnot at stanford.edu
Fri Mar 11 02:30:24 EST 2005

Sorry I had one minor comment I forgot about your new code, Philip, 
more specifically method names: in some of the methods are something 
like 'initWithSymbols:andMatrix:'. I believe 
'initWithSymbols:Matrix:' is more "Cocoa-standard".

... a few minutes interruption...

OK, because I did not want to look too picky and stupid, or be wrong, 
I looked in:

"Don't use "and" to link keywords that are attributes of the receiver.

- (int)runModalForDirectory:(NSString *)path file: (NSString *) name 
types:(NSArray *)fileTypes;

- (int)runModalForDirectory:(NSString *)path andFile:(NSString *)name 
andTypes:(NSArray *)fileTypes;

Although "and" may sound good in this example, it causes problems as 
you create methods with more and more keywords."

Apple said it, not me ;-)


Help science go fast forward:

Charles Parnot
charles.parnot at stanford.edu

Room  B157 in Beckman Center
279, Campus Drive
Stanford University
Stanford, CA 94305 (USA)

Tel +1 650 725 7754
Fax +1 650 725 8021

More information about the Biococoa-dev mailing list