Re: Accessors
Re: Accessors
- Subject: Re: Accessors
- From: Bill Cheeseman <email@hidden>
- Date: Thu, 08 Aug 2002 06:29:55 -0400
on 02-08-08 2:03 AM, Shawn Erickson at email@hidden wrote:
>
- setSomeName: (SomeType*)newSomeName
>
{
>
if (newSomeName == _someName) return;
>
[_someName release];
>
_someName = [newSomeName copy];
>
}
I've noticed a couple of people testing for equality and returning in the
first line, like this. My usual practice is to test for inequality, then
fall through to the bottom if the test is false.
Is there some advantage to the return? I've always thought it was just a
matter of style.
--
Bill Cheeseman - email@hidden
Quechee Software, Quechee, Vermont, USA
http://www.quecheesoftware.com
The AppleScript Sourcebook -
http://www.AppleScriptSourcebook.com
Vermont Recipes -
http://www.stepwise.com/Articles/VermontRecipes
Croquet Club of Vermont -
http://members.valley.net/croquetvermont
_______________________________________________
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.