• 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: Looking at self = [super init].
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Looking at self = [super init].


  • Subject: Re: Looking at self = [super init].
  • From: Quincey Morris <email@hidden>
  • Date: Fri, 29 May 2015 17:42:02 +0000

On May 29, 2015, at 10:35 , Jean-Daniel Dupas <email@hidden> wrote:
>
> You must at least returns nil in the fast path, else the compiler will not be happy.

Shame on you, Jean-Daniel, for not spotting the other error!

On May 29, 2015, at 10:22 , Alex Zavatone <email@hidden> wrote:
>
>    if (self != [super init]) {
>        return;
>    }

The opposite of ‘if (self = [super init])’ isn’t ‘if (self != [super init])’. The correct code is:

	self = [super init];
	if (self == nil)
		return nil;

> I'm not smoking crack here, am I?

We only have your word for it.

> Does this actually seem like a good idea?


Of course it’s a good idea (minus the two glaring bugs).



_______________________________________________

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


  • Follow-Ups:
    • Re: Looking at self = [super init].
      • From: Alex Zavatone <email@hidden>
References: 
 >Looking at self = [super init]. (From: Alex Zavatone <email@hidden>)
 >Re: Looking at self = [super init]. (From: Jean-Daniel Dupas <email@hidden>)

  • Prev by Date: Re: Looking at self = [super init].
  • Next by Date: Re: Looking at self = [super init].
  • Previous by thread: Re: Looking at self = [super init].
  • Next by thread: Re: Looking at self = [super init].
  • Index(es):
    • Date
    • Thread