• 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: self = [super init], nil?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: self = [super init], nil?


  • Subject: Re: self = [super init], nil?
  • From: Thomas Wetmore <email@hidden>
  • Date: Mon, 10 May 2010 11:49:51 -0400

This is the initializer pattern I settled on a few years back:

- (id) init...
{
    if (!(self = [super init])) return nil;
    ...
    return self;
}

Trillions of calls later I can report upon its serviceability.

I come from an old school, formed in the mid 60's, the Savers Institute for Indentation Levels and Code, when Fortran on punch cards was de rigueur. My graduate work was done at the Bell Labs Institute of Advanced Obfuscation when C was cool. Both schools have since lost their raison d'ĂȘtre, and are sometimes ridiculed, but old alumni still cherish their dogmas.

Tom Wetmore, Chief Bottle Washer, DeadEnds Software

_______________________________________________

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: self = [super init], nil?
      • From: Thomas Davie <email@hidden>
  • Prev by Date: Symbolic link refresh issue in 10.5
  • Next by Date: Re: Overriding text size in NSTextStorage
  • Previous by thread: Re: self = [super init], nil?
  • Next by thread: Re: self = [super init], nil?
  • Index(es):
    • Date
    • Thread