Re: Parameter lists
Re: Parameter lists
- Subject: Re: Parameter lists
- From: Ben Dougall <email@hidden>
- Date: Sat, 8 Nov 2003 00:05:11 +0000
On Friday, November 7, 2003, at 10:47 pm, John MacMullin wrote:
With that reflection let us turn to the merits of my comment, which
again, was not intended to insult Apple or anyone else. My original
code came from the Objective C Pocket Reference by Duncan and and the
C Programming Language by K and R. Placing multiple parameters in a
function (or method) separated by commas is the ordinary c approach.
Others on the cocoa list, and in the Apple doc, had stated that
support for the ordinary c language is part of Cocoa. Accordingly, it
just seems to me that this approach should be supported in Cocoa.
yeah, in c and objective-c you can have a variable parameter list for
your function or method, but in both cases, c and objective-c (and in
cocoa - but cocoa's just a framework though so doesn't dictate this
sort of thing), the function needs to be defined appropriately, like
this for example:
- (void) takeSomeObjects:(id)firstObject, ...;
the ... declares that that method can take a variable number of
parameters - one or more. if a method or function isn't declared /
defined like that, then you can't just decide later on to call it with
a variable parameter list separated by commas. you can choose to write
your method / function with either fixed parameters or variable ones,
but you can't then switch within your call. that's in the k&r book you
mention.
On Friday, November 7, 2003, at 12:36 PM, j o a r wrote:
You really think that Apple, and all other Cocoa developers, are
doing things wrong, and you are right? Nice going...
j o a r
On 2003-11-07, at 18.34, John MacMullin wrote:
It would seem that cocoa is not following standard c, or
objective-c, conventions for multiple parameters. I believe that
Apple should.
_______________________________________________
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.
_______________________________________________
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.