Why does Objective-C allow a semicolon at the end of a method definition?

Possible duplicate:
Semicolon after the method name in the Objective-C implementation file

- (id)initWithNibName:(NSString *)nibNameOrNil bundle:(NSBundle *)nibBundleOrNil;
{
    self = [super initWithNibName:nibNameOrNil bundle:nibBundleOrNil];
    if (self) {
        // Custom initialization
    }
    return self;
}

Why am I adding; at the end of the function is also true?

+5
source share
1 answer

This is the convenience of Objective-C. This is so that you can copy / paste the method signature line from your header file. This is one of those things that have been around since the days of NeXTStep.

+9
source

All Articles