• 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: Constructive Criticism
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Constructive Criticism


  • Subject: Re: Constructive Criticism
  • From: Jonathan Dann <email@hidden>
  • Date: Wed, 7 Oct 2009 14:24:55 +0200


- (id) init {
	if(self == [super init]){
		Year = 0;
		orignalYear = 0;
	}
	return (self);
}

In addition to the other comments regarding calling super, you don't need to initialize instance variables to values like 0, 0.0, NO, nil, NULL. The runtime will do that for you. Note, that it doesn't do the same for local variables.


Jonathan

http://madebysofa.com

_______________________________________________

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


References: 
 >Constructive Criticism (From: Mick Walker <email@hidden>)

  • Prev by Date: Re: stringWithCString:length deprecation
  • Next by Date: Re: Mouse move messages sent to both superview and a subview
  • Previous by thread: Re: Constructive Criticism
  • Next by thread: disabling "Open Recent" menu items
  • Index(es):
    • Date
    • Thread