Re: Code style guidelines
Re: Code style guidelines
- Subject: Re: Code style guidelines
- From: Gwynne <email@hidden>
- Date: Thu, 20 May 2004 11:35:03 -0400
On May 20, 2004, at 11:03 AM, Christoffer Lerno wrote:
I'm trying to figure out some good, consistent style for my obj-c
code. Obviously there is the naming guidelines, but what about
spacing?
Are there any preferred way of writing
-(id) someMethod:(NSObject*)anObject?
I've seen spacing like this
- (id)someMethod:(NSObject *)anObject
and many other variants.
Anything to recommend?
When in doubt, I'd go with what the Apple headers use, in most cases.
My preferred style looks like this when it comes to methods:
- (id)someMethodWithParameters:(id)object andMoreParams:(BOOL)flag
andVarArgs:(NSString *)format, ...
As always, code style is often a personal thing, and it ultimately
comes down to one of two things:
1) What works best for you, or
2) If you're working with others, what everyone agrees is clearest.
-- Gwynne, key to the Code that runs us all
Formerly known as Sailor Quasar.
Email: email@hidden
Web:
http://musicimage.plasticchicken.com/
_______________________________________________
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.