Skip to content

Instantly share code, notes, and snippets.

@EmperiorEric
Created June 16, 2013 00:24
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save EmperiorEric/5790170 to your computer and use it in GitHub Desktop.
Save EmperiorEric/5790170 to your computer and use it in GitHub Desktop.
So I've seen both of these options from time to time, and I'm wondering if there is something inherently wrong with an option, if there is some non obvious benefit, or if it is entirely a preference based decision.
- (id)initWithProperty:(id)property
{
self = [super init];
if (self) {
self.property = property;
}
return self;
}
- (id)initWithProperty:(id)property otherProperty:(id)otherProperty
{
self = [self initWithProperty:property];
if (self) {
self.otherProperty = otherProperty;
}
return self;
}
- (id)initWithProperty:(id)property
{
return [self initWithProperty:property otherProperty:nil];
}
- (id)initWithProperty:(id)property otherProperty:(id)otherProperty
{
self = [super init];
if (self) {
self.property = property;
self.otherProperty = otherProperty;
}
return self;
}
@EmperiorEric
Copy link
Author

@EmperiorEric
Copy link
Author

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment