Initializing a variable to zero or ``++nil++`` in an ``++init++`` method is completely redundant; the compiler takes care of that for you. Therefore initializing class instance variables to 0 or ``++nil++`` is simply wasted keystrokes.


This rule applies to methods that return an ``++id++`` and have names that begin with "init".


== Noncompliant Code Example

----
- (id)initWithBlah:(NSString *)blah {
    self = [super init];
    if (self) {
      _count = 0;  // Noncompliant;
      _blah = [blah copy];
    }
    return self;
}
----


== Compliant Solution

----
- (id)initWithBlah:(NSString *)blah {
    self = [super init];
    if (self) {
      _blah = [blah copy];
    }
    return self;
}
----


ifdef::env-github,rspecator-view[]
'''
== Comments And Links
(visible only on this page)

include::comments-and-links.adoc[]
endif::env-github,rspecator-view[]
