On Oct 16, 2009, at 3:55 AM, Bill Bumgarner wrote:
I haven't booted my NS 0.8 cube in about a decade, but I'm pretty sure the semi-colon was always required in the header file and always allowed in the @implementation.

'Twas many a moon ago, but, I do distinctly remember triple-clicking method declarations from headers (with semis) to copy-paste into my implementation without deleting the semi. It always stuck with me as an über-convenience.

I too had the feeling this feature had been around forever, or at least a pretty long time, possibly as far back as the NeXT days.

I don't like it because:

* It's jarring to see the semicolon used as a terminator in the method declaration and as something else -- I'm not sure what; a superfluous separator? -- in the definition where the line of code is otherwise identical.

* I sometimes look for method overrides in my project by doing a global search for ")myMethod" (trusting myself to be consistent about having no space between the return type and the method name). If both the declaration and the definition use the line "(void)myMethod;", it takes slightly more effort to distinguish the declarations from the definitions in the search results. Sure, I could address this by putting the opening brace on the same line, but I strongly prefer the method's opening brace on its own line.

* I'm paranoid about getting used to the pattern

    blah blah blah;
    {
       etc etc
    }

...because it might make it easier to overlook a bug like:

if ([they respondsToSelector:@selector(didStartItFirst)] && [(id) they didStartItFirst]);
    {
        [self startThermonuclearWar];
    }

--Andy

_______________________________________________

Cocoa-dev mailing list ([email protected])

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:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to [email protected]

Reply via email to