• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Amount of Arguments per Method
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Amount of Arguments per Method


  • Subject: Re: Amount of Arguments per Method
  • From: "Sean McBride" <email@hidden>
  • Date: Mon, 22 Jun 2009 07:25:55 -0700
  • Organization: Rogue Research Inc.

That can be better, but then you end up with 2x as many arguments, in a way:

[NSDictionary dictionaryWithObjectsAndKeys:
    ob1, key1,
    ob2, key2, ... etc.


On 6/22/09 7:10 AM, Jack Carbaugh said:

>With that many arguments, i'd make a dictionary and pass only that
>dictionary. I understand your choice for not doing so however.
>
>jack
>
>On Jun 22, 2009, at 4:03 AM, Roland King wrote:
>
>> This still the longest one or has Apple outdone themselves since? 11
>> args, you really wouldn't want much more than this.
>>
>> -
>> (id
>> )initWithBitmapDataPlanes:pixelsWid
>e:pixelsHigh:bitsPerSample:samplesPer
>Pixel:hasAlpha:isPlanar:colorSpaceName:bitmapFormat:bytesPerRow:bitsPerPixel
>> :
>>
>> WT wrote:
>>> On Jun 22, 2009, at 8:05 AM, Chunk 1978 wrote:
>>>> clearly simplicity is important, but i'd like to know if there is a
>>>> limit for the amount of arguments which a method can handle?
>>> I don't know if there's an upper limit, but I don't recall ever
>>> writing a method with more than 5 or 6 arguments. When I feel
>>> inclined  to do otherwise, it typically means that there's a flaw
>>> in my design.
>>> Wagner
>>> _______________________________________________
>>> Cocoa-dev mailing list (email@hidden)
>>> Please do not post admin requests or moderator comments to the list.
>>> Contact the moderators at cocoa-dev-admins(at)lists.apple.com
>>> Help/Unsubscribe/Update your Subscription:
>>> This email sent to email@hidden
>> _______________________________________________
>>
>> Cocoa-dev mailing list (email@hidden)
>>
>> Please do not post admin requests or moderator comments to the list.
>> Contact the moderators at cocoa-dev-admins(at)lists.apple.com
>>
>> Help/Unsubscribe/Update your Subscription:
>>
>> This email sent to email@hidden
>
>_______________________________________________
>
>Cocoa-dev mailing list (email@hidden)
>
>Please do not post admin requests or moderator comments to the list.
>Contact the moderators at cocoa-dev-admins(at)lists.apple.com
>
>Help/Unsubscribe/Update your Subscription:
>
>This email sent to email@hidden
>

--
____________________________________________________________
Sean McBride, B. Eng                 email@hidden
Rogue Research                        www.rogue-research.com
Mac Software Developer              Montréal, Québec, Canada


_______________________________________________

Cocoa-dev mailing list (email@hidden)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden

References: 
 >Amount of Arguments per Method (From: Chunk 1978 <email@hidden>)
 >Re: Amount of Arguments per Method (From: WT <email@hidden>)
 >Re: Amount of Arguments per Method (From: Roland King <email@hidden>)
 >Re: Amount of Arguments per Method (From: Jack Carbaugh <email@hidden>)

  • Prev by Date: Re: Short-circuit evaluation
  • Next by Date: Realtime, GC and ObjC (Was Re: Opinion on managed memory and garbage collection)
  • Previous by thread: Re: Amount of Arguments per Method
  • Next by thread: Re: Amount of Arguments per Method
  • Index(es):
    • Date
    • Thread