Re: Objective-C default arguments??
Re: Objective-C default arguments??
- Subject: Re: Objective-C default arguments??
- From: Wade Tregaskis <email@hidden>
- Date: Sat, 1 Nov 2003 18:54:39 +1100
I'd argue that it's better to only have the one method, and simply make
sure your method handles nil arguments appropriately. There are a few
reasons for this:
a) It saves coding
b) It keeps your class small and simple
c) It makes users of your class think about all the arguments, rather
than jumping for the bare minimum
d) It makes default values for non-objects (e.g. boolean values)
explicit to the class user, rather than hiding them
e) It's the only way to handle methods with more than a couple of
arguments, at which point trying to handle every possible combination
often becomes ridiculous
Wade Tregaskis
-- Sed quis custodiet ipsos custodes?
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.