Re: self = [super init], nil?
Re: self = [super init], nil?
- Subject: Re: self = [super init], nil?
- From: glenn andreas <email@hidden>
- Date: Sat, 08 May 2010 13:19:30 -0500
On May 8, 2010, at 12:35 PM, James Bucanek wrote:
> Kyle Sluder <mailto:email@hidden> wrote (Saturday, May 8, 2010 8:48 AM -0700):
>
>> It might produce less code, it might not. If you're operating at the ObjC
>> level of abstraction and worrying about the codegen of self=[super init], your
>> priorities are out of order.
>
> I'm a coding genius. My priorities are never out of order. ;)
>
> There are completely legitimate reasons to want to optimize one's code, and examining the overhead of -init seems perfectly rational to me. This seemed to be the brunt of the original poster's question.
>
> I was simply pointing out the fallacy of believing that if ((self=[super init])!=nil) is inherently less efficient (e.g. produces more code) than if ([super init]!=nil).
Those two produce different results, so comparing their efficiencies is pointless. To make matters worse, "if ([super init] != nil)" is also wrong, so it doesn't matter if it is more efficient.
Glenn Andreas email@hidden
The most merciful thing in the world ... is the inability of the human mind to correlate all its contents - HPL
_______________________________________________
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